Skip to content

Instantly share code, notes, and snippets.

@cemeyer2
Last active September 26, 2016 22:48
Show Gist options
  • Save cemeyer2/608a1ee801eedff576dd5344101ffb6c to your computer and use it in GitHub Desktop.
Save cemeyer2/608a1ee801eedff576dd5344101ffb6c to your computer and use it in GitHub Desktop.
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Chart=t()}}(function(){var t;return function t(e,i,n){function r(s,a){if(!i[s]){if(!e[s]){var l="function"==typeof require&&require;if(!a&&l)return l(s,!0);if(o)return o(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var c=i[s]={exports:{}};e[s][0].call(c.exports,function(t){var i=e[s][1][t];return r(i?i:t)},c,c.exports,t,e,i,n)}return i[s].exports}for(var o="function"==typeof require&&require,s=0;s<n.length;s++)r(n[s]);return r}({1:[function(t,e){function i(t){if(t){var e=/^#([a-fA-F0-9]{3})$/,i=/^#([a-fA-F0-9]{6})$/,n=/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/,r=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/,o=/(\w+)/,s=[0,0,0],a=1,l=t.match(e);if(l){l=l[1];for(var u=0;u<s.length;u++)s[u]=parseInt(l[u]+l[u],16)}else if(l=t.match(i)){l=l[1];for(var u=0;u<s.length;u++)s[u]=parseInt(l.slice(2*u,2*u+2),16)}else if(l=t.match(n)){for(var u=0;u<s.length;u++)s[u]=parseInt(l[u+1]);a=parseFloat(l[4])}else if(l=t.match(r)){for(var u=0;u<s.length;u++)s[u]=Math.round(2.55*parseFloat(l[u+1]));a=parseFloat(l[4])}else if(l=t.match(o)){if("transparent"==l[1])return[0,0,0,0];if(s=b[l[1]],!s)return}for(var u=0;u<s.length;u++)s[u]=v(s[u],0,255);return a=a||0==a?v(a,0,1):1,s[3]=a,s}}function n(t){if(t){var e=/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/,i=t.match(e);if(i){var n=parseFloat(i[4]),r=v(parseInt(i[1]),0,360),o=v(parseFloat(i[2]),0,100),s=v(parseFloat(i[3]),0,100),a=v(isNaN(n)?1:n,0,1);return[r,o,s,a]}}}function r(t){if(t){var e=/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/,i=t.match(e);if(i){var n=parseFloat(i[4]),r=v(parseInt(i[1]),0,360),o=v(parseFloat(i[2]),0,100),s=v(parseFloat(i[3]),0,100),a=v(isNaN(n)?1:n,0,1);return[r,o,s,a]}}}function o(t){var e=i(t);return e&&e.slice(0,3)}function s(t){var e=n(t);return e&&e.slice(0,3)}function a(t){var e=i(t);return e?e[3]:(e=n(t))?e[3]:(e=r(t))?e[3]:void 0}function l(t){return"#"+y(t[0])+y(t[1])+y(t[2])}function u(t,e){return e<1||t[3]&&t[3]<1?c(t,e):"rgb("+t[0]+", "+t[1]+", "+t[2]+")"}function c(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+e+")"}function h(t,e){if(e<1||t[3]&&t[3]<1)return d(t,e);var i=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),r=Math.round(t[2]/255*100);return"rgb("+i+"%, "+n+"%, "+r+"%)"}function d(t,e){var i=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),r=Math.round(t[2]/255*100);return"rgba("+i+"%, "+n+"%, "+r+"%, "+(e||t[3]||1)+")"}function p(t,e){return e<1||t[3]&&t[3]<1?f(t,e):"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"}function f(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+e+")"}function m(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+(void 0!==e&&1!==e?", "+e:"")+")"}function g(t){return _[t.slice(0,3)]}function v(t,e,i){return Math.min(Math.max(e,t),i)}function y(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}var b=t(5);e.exports={getRgba:i,getHsla:n,getRgb:o,getHsl:s,getHwb:r,getAlpha:a,hexString:l,rgbString:u,rgbaString:c,percentString:h,percentaString:d,hslString:p,hslaString:f,hwbString:m,keyword:g};var _={};for(var w in b)_[b[w]]=w},{5:5}],2:[function(t,e){var i=t(4),n=t(1),r=function(t){if(t instanceof r)return t;if(!(this instanceof r))return new r(t);this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1};var e;if("string"==typeof t)if(e=n.getRgba(t))this.setValues("rgb",e);else if(e=n.getHsla(t))this.setValues("hsl",e);else{if(!(e=n.getHwb(t)))throw new Error('Unable to parse color from string "'+t+'"');this.setValues("hwb",e)}else if("object"==typeof t)if(e=t,void 0!==e.r||void 0!==e.red)this.setValues("rgb",e);else if(void 0!==e.l||void 0!==e.lightness)this.setValues("hsl",e);else if(void 0!==e.v||void 0!==e.value)this.setValues("hsv",e);else if(void 0!==e.w||void 0!==e.whiteness)this.setValues("hwb",e);else{if(void 0===e.c&&void 0===e.cyan)throw new Error("Unable to parse color from object "+JSON.stringify(t));this.setValues("cmyk",e)}};r.prototype={rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){var t=this.values;return 1!==t.alpha?t.hwb.concat([t.alpha]):t.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var t=this.values;return t.rgb.concat([t.alpha])},hslaArray:function(){var t=this.values;return t.hsl.concat([t.alpha])},alpha:function(t){return void 0===t?this.values.alpha:(this.setValues("alpha",t),this)},red:function(t){return this.setChannel("rgb",0,t)},green:function(t){return this.setChannel("rgb",1,t)},blue:function(t){return this.setChannel("rgb",2,t)},hue:function(t){return t&&(t%=360,t=t<0?360+t:t),this.setChannel("hsl",0,t)},saturation:function(t){return this.setChannel("hsl",1,t)},lightness:function(t){return this.setChannel("hsl",2,t)},saturationv:function(t){return this.setChannel("hsv",1,t)},whiteness:function(t){return this.setChannel("hwb",1,t)},blackness:function(t){return this.setChannel("hwb",2,t)},value:function(t){return this.setChannel("hsv",2,t)},cyan:function(t){return this.setChannel("cmyk",0,t)},magenta:function(t){return this.setChannel("cmyk",1,t)},yellow:function(t){return this.setChannel("cmyk",2,t)},black:function(t){return this.setChannel("cmyk",3,t)},hexString:function(){return n.hexString(this.values.rgb)},rgbString:function(){return n.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return n.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return n.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return n.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return n.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return n.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return n.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var t=this.values.rgb;return t[0]<<16|t[1]<<8|t[2]},luminosity:function(){for(var t=this.values.rgb,e=[],i=0;i<t.length;i++){var n=t[i]/255;e[i]=n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity(),i=t.luminosity();return e>i?(e+.05)/(i+.05):(i+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb,e=(299*t[0]+587*t[1]+114*t[2])/1e3;return e<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,i=(e[0]+t)%360;return e[0]=i<0?360+i:i,this.setValues("hsl",e),this},mix:function(t,e){var i=this,n=t,r=void 0===e?.5:e,o=2*r-1,s=i.alpha()-n.alpha(),a=((o*s===-1?o:(o+s)/(1+o*s))+1)/2,l=1-a;return this.rgb(a*i.red()+l*n.red(),a*i.green()+l*n.green(),a*i.blue()+l*n.blue()).alpha(i.alpha()*r+n.alpha()*(1-r))},toJSON:function(){return this.rgb()},clone:function(){var t,e,i=new r,n=this.values,o=i.values;for(var s in n)n.hasOwnProperty(s)&&(t=n[s],e={}.toString.call(t),"[object Array]"===e?o[s]=t.slice(0):"[object Number]"===e?o[s]=t:console.error("unexpected color value:",t));return i}},r.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},r.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},r.prototype.getValues=function(t){for(var e=this.values,i={},n=0;n<t.length;n++)i[t.charAt(n)]=e[t][n];return 1!==e.alpha&&(i.a=e.alpha),i},r.prototype.setValues=function(t,e){var n,r=this.values,o=this.spaces,s=this.maxes,a=1;if("alpha"===t)a=e;else if(e.length)r[t]=e.slice(0,t.length),a=e[t.length];else if(void 0!==e[t.charAt(0)]){for(n=0;n<t.length;n++)r[t][n]=e[t.charAt(n)];a=e.a}else if(void 0!==e[o[t][0]]){var l=o[t];for(n=0;n<t.length;n++)r[t][n]=e[l[n]];a=e.alpha}if(r.alpha=Math.max(0,Math.min(1,void 0===a?r.alpha:a)),"alpha"===t)return!1;var u;for(n=0;n<t.length;n++)u=Math.max(0,Math.min(s[t][n],r[t][n])),r[t][n]=Math.round(u);for(var c in o)c!==t&&(r[c]=i[t][c](r[t]));return!0},r.prototype.setSpace=function(t,e){var i=e[0];return void 0===i?this.getValues(t):("number"==typeof i&&(i=Array.prototype.slice.call(e)),this.setValues(t,i),this)},r.prototype.setChannel=function(t,e,i){var n=this.values[t];return void 0===i?n[e]:i===n[e]?this:(n[e]=i,this.setValues(t,n),this)},"undefined"!=typeof window&&(window.Color=r),e.exports=r},{1:1,4:4}],3:[function(t,e){function i(t){var e,i,n,r=t[0]/255,o=t[1]/255,s=t[2]/255,a=Math.min(r,o,s),l=Math.max(r,o,s),u=l-a;return l==a?e=0:r==l?e=(o-s)/u:o==l?e=2+(s-r)/u:s==l&&(e=4+(r-o)/u),e=Math.min(60*e,360),e<0&&(e+=360),n=(a+l)/2,i=l==a?0:n<=.5?u/(l+a):u/(2-l-a),[e,100*i,100*n]}function n(t){var e,i,n,r=t[0],o=t[1],s=t[2],a=Math.min(r,o,s),l=Math.max(r,o,s),u=l-a;return i=0==l?0:u/l*1e3/10,l==a?e=0:r==l?e=(o-s)/u:o==l?e=2+(s-r)/u:s==l&&(e=4+(r-o)/u),e=Math.min(60*e,360),e<0&&(e+=360),n=l/255*1e3/10,[e,i,n]}function o(t){var e=t[0],n=t[1],r=t[2],o=i(t)[0],s=1/255*Math.min(e,Math.min(n,r)),r=1-1/255*Math.max(e,Math.max(n,r));return[o,100*s,100*r]}function s(t){var e,i,n,r,o=t[0]/255,s=t[1]/255,a=t[2]/255;return r=Math.min(1-o,1-s,1-a),e=(1-o-r)/(1-r)||0,i=(1-s-r)/(1-r)||0,n=(1-a-r)/(1-r)||0,[100*e,100*i,100*n,100*r]}function a(t){return J[JSON.stringify(t)]}function l(t){var e=t[0]/255,i=t[1]/255,n=t[2]/255;e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92;var r=.4124*e+.3576*i+.1805*n,o=.2126*e+.7152*i+.0722*n,s=.0193*e+.1192*i+.9505*n;return[100*r,100*o,100*s]}function u(t){var e,i,n,r=l(t),o=r[0],s=r[1],a=r[2];return o/=95.047,s/=100,a/=108.883,o=o>.008856?Math.pow(o,1/3):7.787*o+16/116,s=s>.008856?Math.pow(s,1/3):7.787*s+16/116,a=a>.008856?Math.pow(a,1/3):7.787*a+16/116,e=116*s-16,i=500*(o-s),n=200*(s-a),[e,i,n]}function c(t){return Y(u(t))}function h(t){var e,i,n,r,o,s=t[0]/360,a=t[1]/100,l=t[2]/100;if(0==a)return o=255*l,[o,o,o];i=l<.5?l*(1+a):l+a-l*a,e=2*l-i,r=[0,0,0];for(var u=0;u<3;u++)n=s+1/3*-(u-1),n<0&&n++,n>1&&n--,o=6*n<1?e+6*(i-e)*n:2*n<1?i:3*n<2?e+(i-e)*(2/3-n)*6:e,r[u]=255*o;return r}function d(t){var e,i,n=t[0],r=t[1]/100,o=t[2]/100;return 0===o?[0,0,0]:(o*=2,r*=o<=1?o:2-o,i=(o+r)/2,e=2*r/(o+r),[n,100*e,100*i])}function p(t){return o(h(t))}function f(t){return s(h(t))}function m(t){return a(h(t))}function v(t){var e=t[0]/60,i=t[1]/100,n=t[2]/100,r=Math.floor(e)%6,o=e-Math.floor(e),s=255*n*(1-i),a=255*n*(1-i*o),l=255*n*(1-i*(1-o)),n=255*n;switch(r){case 0:return[n,l,s];case 1:return[a,n,s];case 2:return[s,n,l];case 3:return[s,a,n];case 4:return[l,s,n];case 5:return[n,s,a]}}function y(t){var e,i,n=t[0],r=t[1]/100,o=t[2]/100;return i=(2-r)*o,e=r*o,e/=i<=1?i:2-i,e=e||0,i/=2,[n,100*e,100*i]}function _(t){return o(v(t))}function w(t){return s(v(t))}function x(t){return a(v(t))}function k(t){var e,i,n,o,s=t[0]/360,a=t[1]/100,l=t[2]/100,u=a+l;switch(u>1&&(a/=u,l/=u),e=Math.floor(6*s),i=1-l,n=6*s-e,0!=(1&e)&&(n=1-n),o=a+n*(i-a),e){default:case 6:case 0:r=i,g=o,b=a;break;case 1:r=o,g=i,b=a;break;case 2:r=a,g=i,b=o;break;case 3:r=a,g=o,b=i;break;case 4:r=o,g=a,b=i;break;case 5:r=i,g=a,b=o}return[255*r,255*g,255*b]}function C(t){return i(k(t))}function M(t){return n(k(t))}function T(t){return s(k(t))}function S(t){return a(k(t))}function D(t){var e,i,n,r=t[0]/100,o=t[1]/100,s=t[2]/100,a=t[3]/100;return e=1-Math.min(1,r*(1-a)+a),i=1-Math.min(1,o*(1-a)+a),n=1-Math.min(1,s*(1-a)+a),[255*e,255*i,255*n]}function L(t){return i(D(t))}function A(t){return n(D(t))}function E(t){return o(D(t))}function I(t){return a(D(t))}function P(t){var e,i,n,r=t[0]/100,o=t[1]/100,s=t[2]/100;return e=3.2406*r+o*-1.5372+s*-.4986,i=r*-.9689+1.8758*o+.0415*s,n=.0557*r+o*-.204+1.057*s,e=e>.0031308?1.055*Math.pow(e,1/2.4)-.055:e=12.92*e,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i=12.92*i,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n=12.92*n,e=Math.min(Math.max(0,e),1),i=Math.min(Math.max(0,i),1),n=Math.min(Math.max(0,n),1),[255*e,255*i,255*n]}function O(t){var e,i,n,r=t[0],o=t[1],s=t[2];return r/=95.047,o/=100,s/=108.883,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,o=o>.008856?Math.pow(o,1/3):7.787*o+16/116,s=s>.008856?Math.pow(s,1/3):7.787*s+16/116,e=116*o-16,i=500*(r-o),n=200*(o-s),[e,i,n]}function j(t){return Y(O(t))}function N(t){var e,i,n,r,o=t[0],s=t[1],a=t[2];return o<=8?(i=100*o/903.3,r=7.787*(i/100)+16/116):(i=100*Math.pow((o+16)/116,3),r=Math.pow(i/100,1/3)),e=e/95.047<=.008856?e=95.047*(s/500+r-16/116)/7.787:95.047*Math.pow(s/500+r,3),n=n/108.883<=.008859?n=108.883*(r-a/200-16/116)/7.787:108.883*Math.pow(r-a/200,3),[e,i,n]}function Y(t){var e,i,n,r=t[0],o=t[1],s=t[2];return e=Math.atan2(s,o),i=360*e/2/Math.PI,i<0&&(i+=360),n=Math.sqrt(o*o+s*s),[r,n,i]}function H(t){return P(N(t))}function F(t){var e,i,n,r=t[0],o=t[1],s=t[2];return n=s/360*2*Math.PI,e=o*Math.cos(n),i=o*Math.sin(n),[r,e,i]}function R(t){return N(F(t))}function W(t){return H(F(t))}function z(t){return X[t]}function B(t){return i(z(t))}function $(t){return n(z(t))}function q(t){return o(z(t))}function U(t){return s(z(t))}function V(t){return u(z(t))}function G(t){return l(z(t))}e.exports={rgb2hsl:i,rgb2hsv:n,rgb2hwb:o,rgb2cmyk:s,rgb2keyword:a,rgb2xyz:l,rgb2lab:u,rgb2lch:c,hsl2rgb:h,hsl2hsv:d,hsl2hwb:p,hsl2cmyk:f,hsl2keyword:m,hsv2rgb:v,hsv2hsl:y,hsv2hwb:_,hsv2cmyk:w,hsv2keyword:x,hwb2rgb:k,hwb2hsl:C,hwb2hsv:M,hwb2cmyk:T,hwb2keyword:S,cmyk2rgb:D,cmyk2hsl:L,cmyk2hsv:A,cmyk2hwb:E,cmyk2keyword:I,keyword2rgb:z,keyword2hsl:B,keyword2hsv:$,keyword2hwb:q,keyword2cmyk:U,keyword2lab:V,keyword2xyz:G,xyz2rgb:P,xyz2lab:O,xyz2lch:j,lab2xyz:N,lab2rgb:H,lab2lch:Y,lch2lab:F,lch2xyz:R,lch2rgb:W};var X={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],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],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},J={};for(var K in X)J[JSON.stringify(X[K])]=K},{}],4:[function(t,e){var i=t(3),n=function(){return new l};for(var r in i){n[r+"Raw"]=function(t){return function(e){return"number"==typeof e&&(e=Array.prototype.slice.call(arguments)),i[t](e)}}(r);var o=/(\w+)2(\w+)/.exec(r),s=o[1],a=o[2];n[s]=n[s]||{},n[s][a]=n[r]=function(t){return function(e){"number"==typeof e&&(e=Array.prototype.slice.call(arguments));var n=i[t](e);if("string"==typeof n||void 0===n)return n;for(var r=0;r<n.length;r++)n[r]=Math.round(n[r]);return n}}(r)}var l=function(){this.convs={}};l.prototype.routeSpace=function(t,e){var i=e[0];return void 0===i?this.getValues(t):("number"==typeof i&&(i=Array.prototype.slice.call(e)),this.setValues(t,i))},l.prototype.setValues=function(t,e){return this.space=t,this.convs={},this.convs[t]=e,this},l.prototype.getValues=function(t){var e=this.convs[t];if(!e){var i=this.space,r=this.convs[i];e=n[i][t](r),this.convs[t]=e}return e},["rgb","hsl","hsv","cmyk","keyword"].forEach(function(t){l.prototype[t]=function(){return this.routeSpace(t,arguments)}}),e.exports=n},{3:3}],5:[function(t,e){e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],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],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},{}],6:[function(e,i,n){!function(e,r){"object"==typeof n&&"undefined"!=typeof i?i.exports=r():"function"==typeof t&&t.amd?t(r):e.moment=r()}(this,function(){"use strict";function t(){return mn.apply(null,arguments)}function n(t){mn=t}function r(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function o(t){return"[object Object]"===Object.prototype.toString.call(t)}function s(t){var e;for(e in t)return!1;return!0}function a(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function l(t,e){var i,n=[];for(i=0;i<t.length;++i)n.push(e(t[i],i));return n}function u(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function c(t,e){for(var i in e)u(e,i)&&(t[i]=e[i]);return u(e,"toString")&&(t.toString=e.toString),u(e,"valueOf")&&(t.valueOf=e.valueOf),t}function h(t,e,i,n){return ye(t,e,i,n,!0).utc()}function d(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null}}function p(t){return null==t._pf&&(t._pf=d()),t._pf}function f(t){if(null==t._isValid){var e=p(t),i=gn.call(e.parsedDateParts,function(t){return null!=t});t._isValid=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidMonth&&!e.invalidWeekday&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&i),t._strict&&(t._isValid=t._isValid&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour)}return t._isValid}function m(t){var e=h(NaN);return null!=t?c(p(e),t):p(e).userInvalidated=!0,e}function g(t){return void 0===t}function v(t,e){var i,n,r;if(g(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),g(e._i)||(t._i=e._i),g(e._f)||(t._f=e._f),g(e._l)||(t._l=e._l),g(e._strict)||(t._strict=e._strict),g(e._tzm)||(t._tzm=e._tzm),g(e._isUTC)||(t._isUTC=e._isUTC),g(e._offset)||(t._offset=e._offset),g(e._pf)||(t._pf=p(e)),g(e._locale)||(t._locale=e._locale),vn.length>0)for(i in vn)n=vn[i],r=e[n],g(r)||(t[n]=r);return t}function y(e){v(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),yn===!1&&(yn=!0,t.updateOffset(this),yn=!1)}function b(t){return t instanceof y||null!=t&&null!=t._isAMomentObject}function _(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function w(t){var e=+t,i=0;return 0!==e&&isFinite(e)&&(i=_(e)),i}function x(t,e,i){var n,r=Math.min(t.length,e.length),o=Math.abs(t.length-e.length),s=0;for(n=0;n<r;n++)(i&&t[n]!==e[n]||!i&&w(t[n])!==w(e[n]))&&s++;return s+o}function k(e){t.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function C(e,i){var n=!0;return c(function(){return null!=t.deprecationHandler&&t.deprecationHandler(null,e),n&&(k(e+"\nArguments: "+Array.prototype.slice.call(arguments).join(", ")+"\n"+(new Error).stack),n=!1),i.apply(this,arguments)},i)}function M(e,i){null!=t.deprecationHandler&&t.deprecationHandler(e,i),bn[e]||(k(i),bn[e]=!0)}function T(t){return t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function S(t){var e,i;for(i in t)e=t[i],T(e)?this[i]=e:this["_"+i]=e;this._config=t,this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function D(t,e){var i,n=c({},t);for(i in e)u(e,i)&&(o(t[i])&&o(e[i])?(n[i]={},c(n[i],t[i]),c(n[i],e[i])):null!=e[i]?n[i]=e[i]:delete n[i]);for(i in t)u(t,i)&&!u(e,i)&&o(t[i])&&(n[i]=c({},n[i]));return n}function L(t){null!=t&&this.set(t)}function A(t,e,i){var n=this._calendar[t]||this._calendar.sameElse;return T(n)?n.call(e,i):n}function E(t){var e=this._longDateFormat[t],i=this._longDateFormat[t.toUpperCase()];return e||!i?e:(this._longDateFormat[t]=i.replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t])}function I(){return this._invalidDate}function P(t){return this._ordinal.replace("%d",t)}function O(t,e,i,n){var r=this._relativeTime[i];return T(r)?r(t,e,i,n):r.replace(/%d/i,t)}function j(t,e){var i=this._relativeTime[t>0?"future":"past"];return T(i)?i(e):i.replace(/%s/i,e)}function N(t,e){var i=t.toLowerCase();Dn[i]=Dn[i+"s"]=Dn[e]=t}function Y(t){return"string"==typeof t?Dn[t]||Dn[t.toLowerCase()]:void 0}function H(t){var e,i,n={};for(i in t)u(t,i)&&(e=Y(i),e&&(n[e]=t[i]));return n}function F(t,e){Ln[t]=e}function R(t){var e=[];for(var i in t)e.push({unit:i,priority:Ln[i]});return e.sort(function(t,e){return t.priority-e.priority}),e}function W(e,i){return function(n){return null!=n?(B(this,e,n),t.updateOffset(this,i),this):z(this,e)}}function z(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function B(t,e,i){t.isValid()&&t._d["set"+(t._isUTC?"UTC":"")+e](i)}function $(t){return t=Y(t),T(this[t])?this[t]():this}function q(t,e){if("object"==typeof t){t=H(t);for(var i=R(t),n=0;n<i.length;n++)this[i[n].unit](t[i[n].unit])}else if(t=Y(t),T(this[t]))return this[t](e);return this}function U(t,e,i){var n=""+Math.abs(t),r=e-n.length,o=t>=0;return(o?i?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+n}function V(t,e,i,n){var r=n;"string"==typeof n&&(r=function(){return this[n]()}),t&&(Pn[t]=r),e&&(Pn[e[0]]=function(){return U(r.apply(this,arguments),e[1],e[2])}),i&&(Pn[i]=function(){return this.localeData().ordinal(r.apply(this,arguments),t)})}function G(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function X(t){var e,i,n=t.match(An);for(e=0,i=n.length;e<i;e++)Pn[n[e]]?n[e]=Pn[n[e]]:n[e]=G(n[e]);return function(e){var r,o="";for(r=0;r<i;r++)o+=n[r]instanceof Function?n[r].call(e,t):n[r];return o}}function J(t,e){return t.isValid()?(e=K(e,t.localeData()),In[e]=In[e]||X(e),In[e](t)):t.localeData().invalidDate()}function K(t,e){function i(t){return e.longDateFormat(t)||t}var n=5;for(En.lastIndex=0;n>=0&&En.test(t);)t=t.replace(En,i),En.lastIndex=0,n-=1;return t}function Q(t,e,i){Kn[t]=T(e)?e:function(t){return t&&i?i:e}}function Z(t,e){return u(Kn,t)?Kn[t](e._strict,e._locale):new RegExp(tt(t))}function tt(t){return et(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,i,n,r){return e||i||n||r}))}function et(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function it(t,e){var i,n=e;for("string"==typeof t&&(t=[t]),"number"==typeof e&&(n=function(t,i){i[e]=w(t)}),i=0;i<t.length;i++)Qn[t[i]]=n}function nt(t,e){it(t,function(t,i,n,r){n._w=n._w||{},e(t,n._w,n,r)})}function rt(t,e,i){null!=e&&u(Qn,t)&&Qn[t](e,i._a,i,t)}function ot(t,e){return new Date(Date.UTC(t,e+1,0)).getUTCDate()}function st(t,e){return r(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||lr).test(e)?"format":"standalone"][t.month()]}function at(t,e){return r(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[lr.test(e)?"format":"standalone"][t.month()]}function lt(t,e,i){var n,r,o,s=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)o=h([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(o,"").toLocaleLowerCase();return i?"MMM"===e?(r=wn.call(this._shortMonthsParse,s),r!==-1?r:null):(r=wn.call(this._longMonthsParse,s),r!==-1?r:null):"MMM"===e?(r=wn.call(this._shortMonthsParse,s),r!==-1?r:(r=wn.call(this._longMonthsParse,s),r!==-1?r:null)):(r=wn.call(this._longMonthsParse,s),r!==-1?r:(r=wn.call(this._shortMonthsParse,s),r!==-1?r:null))}function ut(t,e,i){var n,r,o;if(this._monthsParseExact)return lt.call(this,t,e,i);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(r=h([2e3,n]),i&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),i||this._monthsParse[n]||(o="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[n]=new RegExp(o.replace(".",""),"i")),i&&"MMMM"===e&&this._longMonthsParse[n].test(t))return n;if(i&&"MMM"===e&&this._shortMonthsParse[n].test(t))return n;if(!i&&this._monthsParse[n].test(t))return n}}function ct(t,e){var i;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=w(e);else if(e=t.localeData().monthsParse(e),"number"!=typeof e)return t;return i=Math.min(t.date(),ot(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,i),t}function ht(e){return null!=e?(ct(this,e),t.updateOffset(this,!0),this):z(this,"Month")}function dt(){return ot(this.year(),this.month())}function pt(t){return this._monthsParseExact?(u(this,"_monthsRegex")||mt.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(u(this,"_monthsShortRegex")||(this._monthsShortRegex=hr),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)}function ft(t){return this._monthsParseExact?(u(this,"_monthsRegex")||mt.call(this),t?this._monthsStrictRegex:this._monthsRegex):(u(this,"_monthsRegex")||(this._monthsRegex=dr),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)}function mt(){function t(t,e){return e.length-t.length}var e,i,n=[],r=[],o=[];for(e=0;e<12;e++)i=h([2e3,e]),n.push(this.monthsShort(i,"")),r.push(this.months(i,"")),o.push(this.months(i,"")),o.push(this.monthsShort(i,""));for(n.sort(t),r.sort(t),o.sort(t),e=0;e<12;e++)n[e]=et(n[e]),r[e]=et(r[e]);for(e=0;e<24;e++)o[e]=et(o[e]);this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,
this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+n.join("|")+")","i")}function gt(t){return vt(t)?366:365}function vt(t){return t%4===0&&t%100!==0||t%400===0}function yt(){return vt(this.year())}function bt(t,e,i,n,r,o,s){var a=new Date(t,e,i,n,r,o,s);return t<100&&t>=0&&isFinite(a.getFullYear())&&a.setFullYear(t),a}function _t(t){var e=new Date(Date.UTC.apply(null,arguments));return t<100&&t>=0&&isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t),e}function wt(t,e,i){var n=7+e-i,r=(7+_t(t,0,n).getUTCDay()-e)%7;return-r+n-1}function xt(t,e,i,n,r){var o,s,a=(7+i-n)%7,l=wt(t,n,r),u=1+7*(e-1)+a+l;return u<=0?(o=t-1,s=gt(o)+u):u>gt(t)?(o=t+1,s=u-gt(t)):(o=t,s=u),{year:o,dayOfYear:s}}function kt(t,e,i){var n,r,o=wt(t.year(),e,i),s=Math.floor((t.dayOfYear()-o-1)/7)+1;return s<1?(r=t.year()-1,n=s+Ct(r,e,i)):s>Ct(t.year(),e,i)?(n=s-Ct(t.year(),e,i),r=t.year()+1):(r=t.year(),n=s),{week:n,year:r}}function Ct(t,e,i){var n=wt(t,e,i),r=wt(t+1,e,i);return(gt(t)-n+r)/7}function Mt(t){return kt(t,this._week.dow,this._week.doy).week}function Tt(){return this._week.dow}function St(){return this._week.doy}function Dt(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function Lt(t){var e=kt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function At(t,e){return"string"!=typeof t?t:isNaN(t)?(t=e.weekdaysParse(t),"number"==typeof t?t:null):parseInt(t,10)}function Et(t,e){return"string"==typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}function It(t,e){return r(this._weekdays)?this._weekdays[t.day()]:this._weekdays[this._weekdays.isFormat.test(e)?"format":"standalone"][t.day()]}function Pt(t){return this._weekdaysShort[t.day()]}function Ot(t){return this._weekdaysMin[t.day()]}function jt(t,e,i){var n,r,o,s=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)o=h([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(o,"").toLocaleLowerCase();return i?"dddd"===e?(r=wn.call(this._weekdaysParse,s),r!==-1?r:null):"ddd"===e?(r=wn.call(this._shortWeekdaysParse,s),r!==-1?r:null):(r=wn.call(this._minWeekdaysParse,s),r!==-1?r:null):"dddd"===e?(r=wn.call(this._weekdaysParse,s),r!==-1?r:(r=wn.call(this._shortWeekdaysParse,s),r!==-1?r:(r=wn.call(this._minWeekdaysParse,s),r!==-1?r:null))):"ddd"===e?(r=wn.call(this._shortWeekdaysParse,s),r!==-1?r:(r=wn.call(this._weekdaysParse,s),r!==-1?r:(r=wn.call(this._minWeekdaysParse,s),r!==-1?r:null))):(r=wn.call(this._minWeekdaysParse,s),r!==-1?r:(r=wn.call(this._weekdaysParse,s),r!==-1?r:(r=wn.call(this._shortWeekdaysParse,s),r!==-1?r:null)))}function Nt(t,e,i){var n,r,o;if(this._weekdaysParseExact)return jt.call(this,t,e,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(r=h([2e3,1]).day(n),i&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(r,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(r,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(r,"").replace(".",".?")+"$","i")),this._weekdaysParse[n]||(o="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[n]=new RegExp(o.replace(".",""),"i")),i&&"dddd"===e&&this._fullWeekdaysParse[n].test(t))return n;if(i&&"ddd"===e&&this._shortWeekdaysParse[n].test(t))return n;if(i&&"dd"===e&&this._minWeekdaysParse[n].test(t))return n;if(!i&&this._weekdaysParse[n].test(t))return n}}function Yt(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=At(t,this.localeData()),this.add(t-e,"d")):e}function Ht(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function Ft(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=Et(t,this.localeData());return this.day(this.day()%7?e:e-7)}return this.day()||7}function Rt(t){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||Bt.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(u(this,"_weekdaysRegex")||(this._weekdaysRegex=yr),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function Wt(t){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||Bt.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(u(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=br),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function zt(t){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||Bt.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(u(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=_r),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Bt(){function t(t,e){return e.length-t.length}var e,i,n,r,o,s=[],a=[],l=[],u=[];for(e=0;e<7;e++)i=h([2e3,1]).day(e),n=this.weekdaysMin(i,""),r=this.weekdaysShort(i,""),o=this.weekdays(i,""),s.push(n),a.push(r),l.push(o),u.push(n),u.push(r),u.push(o);for(s.sort(t),a.sort(t),l.sort(t),u.sort(t),e=0;e<7;e++)a[e]=et(a[e]),l[e]=et(l[e]),u[e]=et(u[e]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function $t(){return this.hours()%12||12}function qt(){return this.hours()||24}function Ut(t,e){V(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function Vt(t,e){return e._meridiemParse}function Gt(t){return"p"===(t+"").toLowerCase().charAt(0)}function Xt(t,e,i){return t>11?i?"pm":"PM":i?"am":"AM"}function Jt(t){return t?t.toLowerCase().replace("_","-"):t}function Kt(t){for(var e,i,n,r,o=0;o<t.length;){for(r=Jt(t[o]).split("-"),e=r.length,i=Jt(t[o+1]),i=i?i.split("-"):null;e>0;){if(n=Qt(r.slice(0,e).join("-")))return n;if(i&&i.length>=e&&x(r,i,!0)>=e-1)break;e--}o++}return null}function Qt(t){var n=null;if(!Mr[t]&&"undefined"!=typeof i&&i&&i.exports)try{n=wr._abbr,e("./locale/"+t),Zt(n)}catch(t){}return Mr[t]}function Zt(t,e){var i;return t&&(i=g(e)?ie(t):te(t,e),i&&(wr=i)),wr._abbr}function te(t,e){if(null!==e){var i=Cr;return e.abbr=t,null!=Mr[t]?(M("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=Mr[t]._config):null!=e.parentLocale&&(null!=Mr[e.parentLocale]?i=Mr[e.parentLocale]._config:M("parentLocaleUndefined","specified parentLocale is not defined yet. See http://momentjs.com/guides/#/warnings/parent-locale/")),Mr[t]=new L(D(i,e)),Zt(t),Mr[t]}return delete Mr[t],null}function ee(t,e){if(null!=e){var i,n=Cr;null!=Mr[t]&&(n=Mr[t]._config),e=D(n,e),i=new L(e),i.parentLocale=Mr[t],Mr[t]=i,Zt(t)}else null!=Mr[t]&&(null!=Mr[t].parentLocale?Mr[t]=Mr[t].parentLocale:null!=Mr[t]&&delete Mr[t]);return Mr[t]}function ie(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return wr;if(!r(t)){if(e=Qt(t))return e;t=[t]}return Kt(t)}function ne(){return _n(Mr)}function re(t){var e,i=t._a;return i&&p(t).overflow===-2&&(e=i[tr]<0||i[tr]>11?tr:i[er]<1||i[er]>ot(i[Zn],i[tr])?er:i[ir]<0||i[ir]>24||24===i[ir]&&(0!==i[nr]||0!==i[rr]||0!==i[or])?ir:i[nr]<0||i[nr]>59?nr:i[rr]<0||i[rr]>59?rr:i[or]<0||i[or]>999?or:-1,p(t)._overflowDayOfYear&&(e<Zn||e>er)&&(e=er),p(t)._overflowWeeks&&e===-1&&(e=sr),p(t)._overflowWeekday&&e===-1&&(e=ar),p(t).overflow=e),t}function oe(t){var e,i,n,r,o,s,a=t._i,l=Tr.exec(a)||Sr.exec(a);if(l){for(p(t).iso=!0,e=0,i=Lr.length;e<i;e++)if(Lr[e][1].exec(l[1])){r=Lr[e][0],n=Lr[e][2]!==!1;break}if(null==r)return void(t._isValid=!1);if(l[3]){for(e=0,i=Ar.length;e<i;e++)if(Ar[e][1].exec(l[3])){o=(l[2]||" ")+Ar[e][0];break}if(null==o)return void(t._isValid=!1)}if(!n&&null!=o)return void(t._isValid=!1);if(l[4]){if(!Dr.exec(l[4]))return void(t._isValid=!1);s="Z"}t._f=r+(o||"")+(s||""),he(t)}else t._isValid=!1}function se(e){var i=Er.exec(e._i);return null!==i?void(e._d=new Date(+i[1])):(oe(e),void(e._isValid===!1&&(delete e._isValid,t.createFromInputFallback(e))))}function ae(t,e,i){return null!=t?t:null!=e?e:i}function le(e){var i=new Date(t.now());return e._useUTC?[i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()]:[i.getFullYear(),i.getMonth(),i.getDate()]}function ue(t){var e,i,n,r,o=[];if(!t._d){for(n=le(t),t._w&&null==t._a[er]&&null==t._a[tr]&&ce(t),t._dayOfYear&&(r=ae(t._a[Zn],n[Zn]),t._dayOfYear>gt(r)&&(p(t)._overflowDayOfYear=!0),i=_t(r,0,t._dayOfYear),t._a[tr]=i.getUTCMonth(),t._a[er]=i.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=o[e]=n[e];for(;e<7;e++)t._a[e]=o[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[ir]&&0===t._a[nr]&&0===t._a[rr]&&0===t._a[or]&&(t._nextDay=!0,t._a[ir]=0),t._d=(t._useUTC?_t:bt).apply(null,o),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[ir]=24)}}function ce(t){var e,i,n,r,o,s,a,l;e=t._w,null!=e.GG||null!=e.W||null!=e.E?(o=1,s=4,i=ae(e.GG,t._a[Zn],kt(be(),1,4).year),n=ae(e.W,1),r=ae(e.E,1),(r<1||r>7)&&(l=!0)):(o=t._locale._week.dow,s=t._locale._week.doy,i=ae(e.gg,t._a[Zn],kt(be(),o,s).year),n=ae(e.w,1),null!=e.d?(r=e.d,(r<0||r>6)&&(l=!0)):null!=e.e?(r=e.e+o,(e.e<0||e.e>6)&&(l=!0)):r=o),n<1||n>Ct(i,o,s)?p(t)._overflowWeeks=!0:null!=l?p(t)._overflowWeekday=!0:(a=xt(i,n,r,o,s),t._a[Zn]=a.year,t._dayOfYear=a.dayOfYear)}function he(e){if(e._f===t.ISO_8601)return void oe(e);e._a=[],p(e).empty=!0;var i,n,r,o,s,a=""+e._i,l=a.length,u=0;for(r=K(e._f,e._locale).match(An)||[],i=0;i<r.length;i++)o=r[i],n=(a.match(Z(o,e))||[])[0],n&&(s=a.substr(0,a.indexOf(n)),s.length>0&&p(e).unusedInput.push(s),a=a.slice(a.indexOf(n)+n.length),u+=n.length),Pn[o]?(n?p(e).empty=!1:p(e).unusedTokens.push(o),rt(o,n,e)):e._strict&&!n&&p(e).unusedTokens.push(o);p(e).charsLeftOver=l-u,a.length>0&&p(e).unusedInput.push(a),e._a[ir]<=12&&p(e).bigHour===!0&&e._a[ir]>0&&(p(e).bigHour=void 0),p(e).parsedDateParts=e._a.slice(0),p(e).meridiem=e._meridiem,e._a[ir]=de(e._locale,e._a[ir],e._meridiem),ue(e),re(e)}function de(t,e,i){var n;return null==i?e:null!=t.meridiemHour?t.meridiemHour(e,i):null!=t.isPM?(n=t.isPM(i),n&&e<12&&(e+=12),n||12!==e||(e=0),e):e}function pe(t){var e,i,n,r,o;if(0===t._f.length)return p(t).invalidFormat=!0,void(t._d=new Date(NaN));for(r=0;r<t._f.length;r++)o=0,e=v({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[r],he(e),f(e)&&(o+=p(e).charsLeftOver,o+=10*p(e).unusedTokens.length,p(e).score=o,(null==n||o<n)&&(n=o,i=e));c(t,i||e)}function fe(t){if(!t._d){var e=H(t._i);t._a=l([e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],function(t){return t&&parseInt(t,10)}),ue(t)}}function me(t){var e=new y(re(ge(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function ge(t){var e=t._i,i=t._f;return t._locale=t._locale||ie(t._l),null===e||void 0===i&&""===e?m({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),b(e)?new y(re(e)):(r(i)?pe(t):a(e)?t._d=e:i?he(t):ve(t),f(t)||(t._d=null),t))}function ve(e){var i=e._i;void 0===i?e._d=new Date(t.now()):a(i)?e._d=new Date(i.valueOf()):"string"==typeof i?se(e):r(i)?(e._a=l(i.slice(0),function(t){return parseInt(t,10)}),ue(e)):"object"==typeof i?fe(e):"number"==typeof i?e._d=new Date(i):t.createFromInputFallback(e)}function ye(t,e,i,n,a){var l={};return"boolean"==typeof i&&(n=i,i=void 0),(o(t)&&s(t)||r(t)&&0===t.length)&&(t=void 0),l._isAMomentObject=!0,l._useUTC=l._isUTC=a,l._l=i,l._i=t,l._f=e,l._strict=n,me(l)}function be(t,e,i,n){return ye(t,e,i,n,!1)}function _e(t,e){var i,n;if(1===e.length&&r(e[0])&&(e=e[0]),!e.length)return be();for(i=e[0],n=1;n<e.length;++n)e[n].isValid()&&!e[n][t](i)||(i=e[n]);return i}function we(){var t=[].slice.call(arguments,0);return _e("isBefore",t)}function xe(){var t=[].slice.call(arguments,0);return _e("isAfter",t)}function ke(t){var e=H(t),i=e.year||0,n=e.quarter||0,r=e.month||0,o=e.week||0,s=e.day||0,a=e.hour||0,l=e.minute||0,u=e.second||0,c=e.millisecond||0;this._milliseconds=+c+1e3*u+6e4*l+1e3*a*60*60,this._days=+s+7*o,this._months=+r+3*n+12*i,this._data={},this._locale=ie(),this._bubble()}function Ce(t){return t instanceof ke}function Me(t,e){V(t,0,0,function(){var t=this.utcOffset(),i="+";return t<0&&(t=-t,i="-"),i+U(~~(t/60),2)+e+U(~~t%60,2)})}function Te(t,e){var i=(e||"").match(t)||[],n=i[i.length-1]||[],r=(n+"").match(jr)||["-",0,0],o=+(60*r[1])+w(r[2]);return"+"===r[0]?o:-o}function Se(e,i){var n,r;return i._isUTC?(n=i.clone(),r=(b(e)||a(e)?e.valueOf():be(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),t.updateOffset(n,!1),n):be(e).local()}function De(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function Le(e,i){var n,r=this._offset||0;return this.isValid()?null!=e?("string"==typeof e?e=Te(Gn,e):Math.abs(e)<16&&(e=60*e),!this._isUTC&&i&&(n=De(this)),this._offset=e,this._isUTC=!0,null!=n&&this.add(n,"m"),r!==e&&(!i||this._changeInProgress?Ue(this,Re(e-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,t.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?r:De(this):null!=e?this:NaN}function Ae(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function Ee(t){return this.utcOffset(0,t)}function Ie(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(De(this),"m")),this}function Pe(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(Te(Vn,this._i)),this}function Oe(t){return!!this.isValid()&&(t=t?be(t).utcOffset():0,(this.utcOffset()-t)%60===0)}function je(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Ne(){if(!g(this._isDSTShifted))return this._isDSTShifted;var t={};if(v(t,this),t=ge(t),t._a){var e=t._isUTC?h(t._a):be(t._a);this._isDSTShifted=this.isValid()&&x(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Ye(){return!!this.isValid()&&!this._isUTC}function He(){return!!this.isValid()&&this._isUTC}function Fe(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}function Re(t,e){var i,n,r,o=t,s=null;return Ce(t)?o={ms:t._milliseconds,d:t._days,M:t._months}:"number"==typeof t?(o={},e?o[e]=t:o.milliseconds=t):(s=Nr.exec(t))?(i="-"===s[1]?-1:1,o={y:0,d:w(s[er])*i,h:w(s[ir])*i,m:w(s[nr])*i,s:w(s[rr])*i,ms:w(s[or])*i}):(s=Yr.exec(t))?(i="-"===s[1]?-1:1,o={y:We(s[2],i),M:We(s[3],i),w:We(s[4],i),d:We(s[5],i),h:We(s[6],i),m:We(s[7],i),s:We(s[8],i)}):null==o?o={}:"object"==typeof o&&("from"in o||"to"in o)&&(r=Be(be(o.from),be(o.to)),o={},o.ms=r.milliseconds,o.M=r.months),n=new ke(o),Ce(t)&&u(t,"_locale")&&(n._locale=t._locale),n}function We(t,e){var i=t&&parseFloat(t.replace(",","."));return(isNaN(i)?0:i)*e}function ze(t,e){var i={milliseconds:0,months:0};return i.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(i.months,"M").isAfter(e)&&--i.months,i.milliseconds=+e-+t.clone().add(i.months,"M"),i}function Be(t,e){var i;return t.isValid()&&e.isValid()?(e=Se(e,t),t.isBefore(e)?i=ze(t,e):(i=ze(e,t),i.milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}function $e(t){return t<0?Math.round(-1*t)*-1:Math.round(t)}function qe(t,e){return function(i,n){var r,o;return null===n||isNaN(+n)||(M(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=i,i=n,n=o),i="string"==typeof i?+i:i,r=Re(i,n),Ue(this,r,t),this}}function Ue(e,i,n,r){var o=i._milliseconds,s=$e(i._days),a=$e(i._months);e.isValid()&&(r=null==r||r,o&&e._d.setTime(e._d.valueOf()+o*n),s&&B(e,"Date",z(e,"Date")+s*n),a&&ct(e,z(e,"Month")+a*n),r&&t.updateOffset(e,s||a))}function Ve(t,e){var i=t.diff(e,"days",!0);return i<-6?"sameElse":i<-1?"lastWeek":i<0?"lastDay":i<1?"sameDay":i<2?"nextDay":i<7?"nextWeek":"sameElse"}function Ge(e,i){var n=e||be(),r=Se(n,this).startOf("day"),o=t.calendarFormat(this,r)||"sameElse",s=i&&(T(i[o])?i[o].call(this,n):i[o]);return this.format(s||this.localeData().calendar(o,this,be(n)))}function Xe(){return new y(this)}function Je(t,e){var i=b(t)?t:be(t);return!(!this.isValid()||!i.isValid())&&(e=Y(g(e)?"millisecond":e),"millisecond"===e?this.valueOf()>i.valueOf():i.valueOf()<this.clone().startOf(e).valueOf())}function Ke(t,e){var i=b(t)?t:be(t);return!(!this.isValid()||!i.isValid())&&(e=Y(g(e)?"millisecond":e),"millisecond"===e?this.valueOf()<i.valueOf():this.clone().endOf(e).valueOf()<i.valueOf())}function Qe(t,e,i,n){return n=n||"()",("("===n[0]?this.isAfter(t,i):!this.isBefore(t,i))&&(")"===n[1]?this.isBefore(e,i):!this.isAfter(e,i))}function Ze(t,e){var i,n=b(t)?t:be(t);return!(!this.isValid()||!n.isValid())&&(e=Y(e||"millisecond"),"millisecond"===e?this.valueOf()===n.valueOf():(i=n.valueOf(),this.clone().startOf(e).valueOf()<=i&&i<=this.clone().endOf(e).valueOf()))}function ti(t,e){return this.isSame(t,e)||this.isAfter(t,e)}function ei(t,e){return this.isSame(t,e)||this.isBefore(t,e)}function ii(t,e,i){var n,r,o,s;return this.isValid()?(n=Se(t,this),n.isValid()?(r=6e4*(n.utcOffset()-this.utcOffset()),e=Y(e),"year"===e||"month"===e||"quarter"===e?(s=ni(this,n),"quarter"===e?s/=3:"year"===e&&(s/=12)):(o=this-n,s="second"===e?o/1e3:"minute"===e?o/6e4:"hour"===e?o/36e5:"day"===e?(o-r)/864e5:"week"===e?(o-r)/6048e5:o),i?s:_(s)):NaN):NaN}function ni(t,e){var i,n,r=12*(e.year()-t.year())+(e.month()-t.month()),o=t.clone().add(r,"months");return e-o<0?(i=t.clone().add(r-1,"months"),n=(e-o)/(o-i)):(i=t.clone().add(r+1,"months"),n=(e-o)/(i-o)),-(r+n)||0}function ri(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function oi(){var t=this.clone().utc();return 0<t.year()&&t.year()<=9999?T(Date.prototype.toISOString)?this.toDate().toISOString():J(t,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):J(t,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}function si(e){e||(e=this.isUtc()?t.defaultFormatUtc:t.defaultFormat);var i=J(this,e);return this.localeData().postformat(i)}function ai(t,e){return this.isValid()&&(b(t)&&t.isValid()||be(t).isValid())?Re({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function li(t){return this.from(be(),t)}function ui(t,e){return this.isValid()&&(b(t)&&t.isValid()||be(t).isValid())?Re({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function ci(t){return this.to(be(),t)}function hi(t){var e;return void 0===t?this._locale._abbr:(e=ie(t),null!=e&&(this._locale=e),this)}function di(){return this._locale}function pi(t){switch(t=Y(t)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===t&&this.weekday(0),"isoWeek"===t&&this.isoWeekday(1),"quarter"===t&&this.month(3*Math.floor(this.month()/3)),this}function fi(t){return t=Y(t),void 0===t||"millisecond"===t?this:("date"===t&&(t="day"),this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms"))}function mi(){return this._d.valueOf()-6e4*(this._offset||0)}function gi(){return Math.floor(this.valueOf()/1e3)}function vi(){return new Date(this.valueOf())}function yi(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function bi(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function _i(){return this.isValid()?this.toISOString():null}function wi(){return f(this)}function xi(){return c({},p(this))}function ki(){return p(this).overflow}function Ci(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Mi(t,e){V(0,[t,t.length],0,e)}function Ti(t){return Ai.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function Si(t){return Ai.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)}function Di(){return Ct(this.year(),1,4)}function Li(){var t=this.localeData()._week;return Ct(this.year(),t.dow,t.doy)}function Ai(t,e,i,n,r){var o;return null==t?kt(this,n,r).year:(o=Ct(t,n,r),e>o&&(e=o),Ei.call(this,t,e,i,n,r))}function Ei(t,e,i,n,r){var o=xt(t,e,i,n,r),s=_t(o.year,0,o.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}function Ii(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)}function Pi(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}function Oi(t,e){e[or]=w(1e3*("0."+t))}function ji(){return this._isUTC?"UTC":""}function Ni(){return this._isUTC?"Coordinated Universal Time":""}function Yi(t){return be(1e3*t)}function Hi(){return be.apply(null,arguments).parseZone()}function Fi(t){return t}function Ri(t,e,i,n){var r=ie(),o=h().set(n,e);return r[i](o,t)}function Wi(t,e,i){if("number"==typeof t&&(e=t,t=void 0),t=t||"",null!=e)return Ri(t,e,i,"month");var n,r=[];for(n=0;n<12;n++)r[n]=Ri(t,n,i,"month");return r}function zi(t,e,i,n){"boolean"==typeof t?("number"==typeof e&&(i=e,e=void 0),e=e||""):(e=t,i=e,t=!1,"number"==typeof e&&(i=e,e=void 0),e=e||"");var r=ie(),o=t?r._week.dow:0;if(null!=i)return Ri(e,(i+o)%7,n,"day");var s,a=[];for(s=0;s<7;s++)a[s]=Ri(e,(s+o)%7,n,"day");return a}function Bi(t,e){return Wi(t,e,"months")}function $i(t,e){return Wi(t,e,"monthsShort")}function qi(t,e,i){return zi(t,e,i,"weekdays")}function Ui(t,e,i){return zi(t,e,i,"weekdaysShort")}function Vi(t,e,i){return zi(t,e,i,"weekdaysMin")}function Gi(){var t=this._data;return this._milliseconds=Xr(this._milliseconds),this._days=Xr(this._days),this._months=Xr(this._months),t.milliseconds=Xr(t.milliseconds),t.seconds=Xr(t.seconds),t.minutes=Xr(t.minutes),t.hours=Xr(t.hours),t.months=Xr(t.months),t.years=Xr(t.years),this}function Xi(t,e,i,n){var r=Re(e,i);return t._milliseconds+=n*r._milliseconds,t._days+=n*r._days,t._months+=n*r._months,t._bubble()}function Ji(t,e){return Xi(this,t,e,1)}function Ki(t,e){return Xi(this,t,e,-1)}function Qi(t){return t<0?Math.floor(t):Math.ceil(t)}function Zi(){var t,e,i,n,r,o=this._milliseconds,s=this._days,a=this._months,l=this._data;return o>=0&&s>=0&&a>=0||o<=0&&s<=0&&a<=0||(o+=864e5*Qi(en(a)+s),s=0,a=0),l.milliseconds=o%1e3,t=_(o/1e3),l.seconds=t%60,e=_(t/60),l.minutes=e%60,i=_(e/60),l.hours=i%24,s+=_(i/24),r=_(tn(s)),a+=r,s-=Qi(en(r)),n=_(a/12),a%=12,l.days=s,l.months=a,l.years=n,this}function tn(t){return 4800*t/146097}function en(t){return 146097*t/4800}function nn(t){var e,i,n=this._milliseconds;if(t=Y(t),"month"===t||"year"===t)return e=this._days+n/864e5,i=this._months+tn(e),"month"===t?i:i/12;switch(e=this._days+Math.round(en(this._months)),t){case"week":return e/7+n/6048e5;case"day":return e+n/864e5;case"hour":return 24*e+n/36e5;case"minute":return 1440*e+n/6e4;case"second":return 86400*e+n/1e3;case"millisecond":return Math.floor(864e5*e)+n;default:throw new Error("Unknown unit "+t)}}function rn(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*w(this._months/12)}function on(t){return function(){return this.as(t)}}function sn(t){return t=Y(t),this[t+"s"]()}function an(t){return function(){return this._data[t]}}function ln(){return _(this.days()/7)}function un(t,e,i,n,r){return r.relativeTime(e||1,!!i,t,n)}function cn(t,e,i){var n=Re(t).abs(),r=ho(n.as("s")),o=ho(n.as("m")),s=ho(n.as("h")),a=ho(n.as("d")),l=ho(n.as("M")),u=ho(n.as("y")),c=r<po.s&&["s",r]||o<=1&&["m"]||o<po.m&&["mm",o]||s<=1&&["h"]||s<po.h&&["hh",s]||a<=1&&["d"]||a<po.d&&["dd",a]||l<=1&&["M"]||l<po.M&&["MM",l]||u<=1&&["y"]||["yy",u];return c[2]=e,c[3]=+t>0,c[4]=i,un.apply(null,c)}function hn(t){return void 0===t?ho:"function"==typeof t&&(ho=t,!0)}function dn(t,e){return void 0!==po[t]&&(void 0===e?po[t]:(po[t]=e,!0))}function pn(t){var e=this.localeData(),i=cn(this,!t,e);return t&&(i=e.pastFuture(+this,i)),e.postformat(i)}function fn(){var t,e,i,n=fo(this._milliseconds)/1e3,r=fo(this._days),o=fo(this._months);t=_(n/60),e=_(t/60),n%=60,t%=60,i=_(o/12),o%=12;var s=i,a=o,l=r,u=e,c=t,h=n,d=this.asSeconds();return d?(d<0?"-":"")+"P"+(s?s+"Y":"")+(a?a+"M":"")+(l?l+"D":"")+(u||c||h?"T":"")+(u?u+"H":"")+(c?c+"M":"")+(h?h+"S":""):"P0D"}var mn,gn;gn=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),i=e.length>>>0,n=0;n<i;n++)if(n in e&&t.call(this,e[n],n,e))return!0;return!1};var vn=t.momentProperties=[],yn=!1,bn={};t.suppressDeprecationWarnings=!1,t.deprecationHandler=null;var _n;_n=Object.keys?Object.keys:function(t){var e,i=[];for(e in t)u(t,e)&&i.push(e);return i};var wn,xn={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},kn={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"},Cn="Invalid date",Mn="%d",Tn=/\d{1,2}/,Sn={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"},Dn={},Ln={},An=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,En=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,In={},Pn={},On=/\d/,jn=/\d\d/,Nn=/\d{3}/,Yn=/\d{4}/,Hn=/[+-]?\d{6}/,Fn=/\d\d?/,Rn=/\d\d\d\d?/,Wn=/\d\d\d\d\d\d?/,zn=/\d{1,3}/,Bn=/\d{1,4}/,$n=/[+-]?\d{1,6}/,qn=/\d+/,Un=/[+-]?\d+/,Vn=/Z|[+-]\d\d:?\d\d/gi,Gn=/Z|[+-]\d\d(?::?\d\d)?/gi,Xn=/[+-]?\d+(\.\d{1,3})?/,Jn=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Kn={},Qn={},Zn=0,tr=1,er=2,ir=3,nr=4,rr=5,or=6,sr=7,ar=8;wn=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1},V("M",["MM",2],"Mo",function(){return this.month()+1}),V("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),V("MMMM",0,0,function(t){return this.localeData().months(this,t)}),N("month","M"),F("month",8),Q("M",Fn),Q("MM",Fn,jn),Q("MMM",function(t,e){return e.monthsShortRegex(t)}),Q("MMMM",function(t,e){return e.monthsRegex(t)}),it(["M","MM"],function(t,e){e[tr]=w(t)-1}),it(["MMM","MMMM"],function(t,e,i,n){var r=i._locale.monthsParse(t,n,i._strict);null!=r?e[tr]=r:p(i).invalidMonth=t});var lr=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/,ur="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),cr="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),hr=Jn,dr=Jn;V("Y",0,0,function(){var t=this.year();return t<=9999?""+t:"+"+t}),V(0,["YY",2],0,function(){return this.year()%100}),V(0,["YYYY",4],0,"year"),V(0,["YYYYY",5],0,"year"),V(0,["YYYYYY",6,!0],0,"year"),N("year","y"),F("year",1),Q("Y",Un),Q("YY",Fn,jn),Q("YYYY",Bn,Yn),Q("YYYYY",$n,Hn),Q("YYYYYY",$n,Hn),it(["YYYYY","YYYYYY"],Zn),it("YYYY",function(e,i){i[Zn]=2===e.length?t.parseTwoDigitYear(e):w(e)}),it("YY",function(e,i){i[Zn]=t.parseTwoDigitYear(e)}),it("Y",function(t,e){e[Zn]=parseInt(t,10)}),t.parseTwoDigitYear=function(t){return w(t)+(w(t)>68?1900:2e3)};var pr=W("FullYear",!0);V("w",["ww",2],"wo","week"),V("W",["WW",2],"Wo","isoWeek"),N("week","w"),N("isoWeek","W"),F("week",5),F("isoWeek",5),Q("w",Fn),Q("ww",Fn,jn),Q("W",Fn),Q("WW",Fn,jn),nt(["w","ww","W","WW"],function(t,e,i,n){e[n.substr(0,1)]=w(t)});var fr={dow:0,doy:6};V("d",0,"do","day"),V("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),V("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),V("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),V("e",0,0,"weekday"),V("E",0,0,"isoWeekday"),N("day","d"),N("weekday","e"),N("isoWeekday","E"),F("day",11),F("weekday",11),F("isoWeekday",11),Q("d",Fn),Q("e",Fn),Q("E",Fn),Q("dd",function(t,e){return e.weekdaysMinRegex(t)}),Q("ddd",function(t,e){return e.weekdaysShortRegex(t)}),Q("dddd",function(t,e){return e.weekdaysRegex(t)}),nt(["dd","ddd","dddd"],function(t,e,i,n){var r=i._locale.weekdaysParse(t,n,i._strict);null!=r?e.d=r:p(i).invalidWeekday=t}),nt(["d","e","E"],function(t,e,i,n){e[n]=w(t)});var mr="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),gr="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),vr="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),yr=Jn,br=Jn,_r=Jn;V("H",["HH",2],0,"hour"),V("h",["hh",2],0,$t),V("k",["kk",2],0,qt),V("hmm",0,0,function(){return""+$t.apply(this)+U(this.minutes(),2)}),V("hmmss",0,0,function(){return""+$t.apply(this)+U(this.minutes(),2)+U(this.seconds(),2)}),V("Hmm",0,0,function(){return""+this.hours()+U(this.minutes(),2)}),V("Hmmss",0,0,function(){return""+this.hours()+U(this.minutes(),2)+U(this.seconds(),2)}),Ut("a",!0),Ut("A",!1),N("hour","h"),F("hour",13),Q("a",Vt),Q("A",Vt),Q("H",Fn),Q("h",Fn),Q("HH",Fn,jn),Q("hh",Fn,jn),Q("hmm",Rn),Q("hmmss",Wn),Q("Hmm",Rn),Q("Hmmss",Wn),it(["H","HH"],ir),it(["a","A"],function(t,e,i){i._isPm=i._locale.isPM(t),i._meridiem=t}),it(["h","hh"],function(t,e,i){e[ir]=w(t),p(i).bigHour=!0}),it("hmm",function(t,e,i){var n=t.length-2;e[ir]=w(t.substr(0,n)),e[nr]=w(t.substr(n)),p(i).bigHour=!0}),it("hmmss",function(t,e,i){var n=t.length-4,r=t.length-2;e[ir]=w(t.substr(0,n)),e[nr]=w(t.substr(n,2)),e[rr]=w(t.substr(r)),p(i).bigHour=!0}),it("Hmm",function(t,e){var i=t.length-2;e[ir]=w(t.substr(0,i)),e[nr]=w(t.substr(i))}),it("Hmmss",function(t,e){var i=t.length-4,n=t.length-2;e[ir]=w(t.substr(0,i)),e[nr]=w(t.substr(i,2)),e[rr]=w(t.substr(n))});var wr,xr=/[ap]\.?m?\.?/i,kr=W("Hours",!0),Cr={calendar:xn,longDateFormat:kn,invalidDate:Cn,ordinal:Mn,ordinalParse:Tn,relativeTime:Sn,months:ur,monthsShort:cr,week:fr,weekdays:mr,weekdaysMin:vr,weekdaysShort:gr,meridiemParse:xr},Mr={},Tr=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,Sr=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,Dr=/Z|[+-]\d\d(?::?\d\d)?/,Lr=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],Ar=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Er=/^\/?Date\((\-?\d+)/i;t.createFromInputFallback=C("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),t.ISO_8601=function(){};var Ir=C("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=be.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:m()}),Pr=C("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=be.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:m()}),Or=function(){return Date.now?Date.now():+new Date};Me("Z",":"),Me("ZZ",""),Q("Z",Gn),Q("ZZ",Gn),it(["Z","ZZ"],function(t,e,i){i._useUTC=!0,i._tzm=Te(Gn,t)});var jr=/([\+\-]|\d\d)/gi;t.updateOffset=function(){};var Nr=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?\d*)?$/,Yr=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;Re.fn=ke.prototype;var Hr=qe(1,"add"),Fr=qe(-1,"subtract");t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",t.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Rr=C("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});V(0,["gg",2],0,function(){
return this.weekYear()%100}),V(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Mi("gggg","weekYear"),Mi("ggggg","weekYear"),Mi("GGGG","isoWeekYear"),Mi("GGGGG","isoWeekYear"),N("weekYear","gg"),N("isoWeekYear","GG"),F("weekYear",1),F("isoWeekYear",1),Q("G",Un),Q("g",Un),Q("GG",Fn,jn),Q("gg",Fn,jn),Q("GGGG",Bn,Yn),Q("gggg",Bn,Yn),Q("GGGGG",$n,Hn),Q("ggggg",$n,Hn),nt(["gggg","ggggg","GGGG","GGGGG"],function(t,e,i,n){e[n.substr(0,2)]=w(t)}),nt(["gg","GG"],function(e,i,n,r){i[r]=t.parseTwoDigitYear(e)}),V("Q",0,"Qo","quarter"),N("quarter","Q"),F("quarter",7),Q("Q",On),it("Q",function(t,e){e[tr]=3*(w(t)-1)}),V("D",["DD",2],"Do","date"),N("date","D"),F("date",9),Q("D",Fn),Q("DD",Fn,jn),Q("Do",function(t,e){return t?e._ordinalParse:e._ordinalParseLenient}),it(["D","DD"],er),it("Do",function(t,e){e[er]=w(t.match(Fn)[0],10)});var Wr=W("Date",!0);V("DDD",["DDDD",3],"DDDo","dayOfYear"),N("dayOfYear","DDD"),F("dayOfYear",4),Q("DDD",zn),Q("DDDD",Nn),it(["DDD","DDDD"],function(t,e,i){i._dayOfYear=w(t)}),V("m",["mm",2],0,"minute"),N("minute","m"),F("minute",14),Q("m",Fn),Q("mm",Fn,jn),it(["m","mm"],nr);var zr=W("Minutes",!1);V("s",["ss",2],0,"second"),N("second","s"),F("second",15),Q("s",Fn),Q("ss",Fn,jn),it(["s","ss"],rr);var Br=W("Seconds",!1);V("S",0,0,function(){return~~(this.millisecond()/100)}),V(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),V(0,["SSS",3],0,"millisecond"),V(0,["SSSS",4],0,function(){return 10*this.millisecond()}),V(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),V(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),V(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),V(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),V(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),N("millisecond","ms"),F("millisecond",16),Q("S",zn,On),Q("SS",zn,jn),Q("SSS",zn,Nn);var $r;for($r="SSSS";$r.length<=9;$r+="S")Q($r,qn);for($r="S";$r.length<=9;$r+="S")it($r,Oi);var qr=W("Milliseconds",!1);V("z",0,0,"zoneAbbr"),V("zz",0,0,"zoneName");var Ur=y.prototype;Ur.add=Hr,Ur.calendar=Ge,Ur.clone=Xe,Ur.diff=ii,Ur.endOf=fi,Ur.format=si,Ur.from=ai,Ur.fromNow=li,Ur.to=ui,Ur.toNow=ci,Ur.get=$,Ur.invalidAt=ki,Ur.isAfter=Je,Ur.isBefore=Ke,Ur.isBetween=Qe,Ur.isSame=Ze,Ur.isSameOrAfter=ti,Ur.isSameOrBefore=ei,Ur.isValid=wi,Ur.lang=Rr,Ur.locale=hi,Ur.localeData=di,Ur.max=Pr,Ur.min=Ir,Ur.parsingFlags=xi,Ur.set=q,Ur.startOf=pi,Ur.subtract=Fr,Ur.toArray=yi,Ur.toObject=bi,Ur.toDate=vi,Ur.toISOString=oi,Ur.toJSON=_i,Ur.toString=ri,Ur.unix=gi,Ur.valueOf=mi,Ur.creationData=Ci,Ur.year=pr,Ur.isLeapYear=yt,Ur.weekYear=Ti,Ur.isoWeekYear=Si,Ur.quarter=Ur.quarters=Ii,Ur.month=ht,Ur.daysInMonth=dt,Ur.week=Ur.weeks=Dt,Ur.isoWeek=Ur.isoWeeks=Lt,Ur.weeksInYear=Li,Ur.isoWeeksInYear=Di,Ur.date=Wr,Ur.day=Ur.days=Yt,Ur.weekday=Ht,Ur.isoWeekday=Ft,Ur.dayOfYear=Pi,Ur.hour=Ur.hours=kr,Ur.minute=Ur.minutes=zr,Ur.second=Ur.seconds=Br,Ur.millisecond=Ur.milliseconds=qr,Ur.utcOffset=Le,Ur.utc=Ee,Ur.local=Ie,Ur.parseZone=Pe,Ur.hasAlignedHourOffset=Oe,Ur.isDST=je,Ur.isLocal=Ye,Ur.isUtcOffset=He,Ur.isUtc=Fe,Ur.isUTC=Fe,Ur.zoneAbbr=ji,Ur.zoneName=Ni,Ur.dates=C("dates accessor is deprecated. Use date instead.",Wr),Ur.months=C("months accessor is deprecated. Use month instead",ht),Ur.years=C("years accessor is deprecated. Use year instead",pr),Ur.zone=C("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Ae),Ur.isDSTShifted=C("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Ne);var Vr=Ur,Gr=L.prototype;Gr.calendar=A,Gr.longDateFormat=E,Gr.invalidDate=I,Gr.ordinal=P,Gr.preparse=Fi,Gr.postformat=Fi,Gr.relativeTime=O,Gr.pastFuture=j,Gr.set=S,Gr.months=st,Gr.monthsShort=at,Gr.monthsParse=ut,Gr.monthsRegex=ft,Gr.monthsShortRegex=pt,Gr.week=Mt,Gr.firstDayOfYear=St,Gr.firstDayOfWeek=Tt,Gr.weekdays=It,Gr.weekdaysMin=Ot,Gr.weekdaysShort=Pt,Gr.weekdaysParse=Nt,Gr.weekdaysRegex=Rt,Gr.weekdaysShortRegex=Wt,Gr.weekdaysMinRegex=zt,Gr.isPM=Gt,Gr.meridiem=Xt,Zt("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,i=1===w(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+i}}),t.lang=C("moment.lang is deprecated. Use moment.locale instead.",Zt),t.langData=C("moment.langData is deprecated. Use moment.localeData instead.",ie);var Xr=Math.abs,Jr=on("ms"),Kr=on("s"),Qr=on("m"),Zr=on("h"),to=on("d"),eo=on("w"),io=on("M"),no=on("y"),ro=an("milliseconds"),oo=an("seconds"),so=an("minutes"),ao=an("hours"),lo=an("days"),uo=an("months"),co=an("years"),ho=Math.round,po={s:45,m:45,h:22,d:26,M:11},fo=Math.abs,mo=ke.prototype;mo.abs=Gi,mo.add=Ji,mo.subtract=Ki,mo.as=nn,mo.asMilliseconds=Jr,mo.asSeconds=Kr,mo.asMinutes=Qr,mo.asHours=Zr,mo.asDays=to,mo.asWeeks=eo,mo.asMonths=io,mo.asYears=no,mo.valueOf=rn,mo._bubble=Zi,mo.get=sn,mo.milliseconds=ro,mo.seconds=oo,mo.minutes=so,mo.hours=ao,mo.days=lo,mo.weeks=ln,mo.months=uo,mo.years=co,mo.humanize=pn,mo.toISOString=fn,mo.toString=fn,mo.toJSON=fn,mo.locale=hi,mo.localeData=di,mo.toIsoString=C("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",fn),mo.lang=Rr,V("X",0,0,"unix"),V("x",0,0,"valueOf"),Q("x",Un),Q("X",Xn),it("X",function(t,e,i){i._d=new Date(1e3*parseFloat(t,10))}),it("x",function(t,e,i){i._d=new Date(w(t))}),t.version="2.14.1",n(be),t.fn=Vr,t.min=we,t.max=xe,t.now=Or,t.utc=h,t.unix=Yi,t.months=Bi,t.isDate=a,t.locale=Zt,t.invalid=m,t.duration=Re,t.isMoment=b,t.weekdays=qi,t.parseZone=Hi,t.localeData=ie,t.isDuration=Ce,t.monthsShort=$i,t.weekdaysMin=Vi,t.defineLocale=te,t.updateLocale=ee,t.locales=ne,t.weekdaysShort=Ui,t.normalizeUnits=Y,t.relativeTimeRounding=hn,t.relativeTimeThreshold=dn,t.calendarFormat=Ve,t.prototype=Vr;var go=t;return go})},{}],7:[function(t,e){var i=t(27)();t(26)(i),t(22)(i),t(25)(i),t(21)(i),t(23)(i),t(24)(i),t(28)(i),t(32)(i),t(30)(i),t(31)(i),t(33)(i),t(29)(i),t(34)(i),t(35)(i),t(36)(i),t(37)(i),t(38)(i),t(41)(i),t(39)(i),t(40)(i),t(42)(i),t(43)(i),t(44)(i),t(15)(i),t(16)(i),t(17)(i),t(18)(i),t(19)(i),t(20)(i),t(8)(i),t(9)(i),t(10)(i),t(11)(i),t(12)(i),t(13)(i),t(14)(i),window.Chart=e.exports=i},{10:10,11:11,12:12,13:13,14:14,15:15,16:16,17:17,18:18,19:19,20:20,21:21,22:22,23:23,24:24,25:25,26:26,27:27,28:28,29:29,30:30,31:31,32:32,33:33,34:34,35:35,36:36,37:37,38:38,39:39,40:40,41:41,42:42,43:43,44:44,8:8,9:9}],8:[function(t,e){"use strict";e.exports=function(t){t.Bar=function(e,i){return i.type="bar",new t(e,i)}}},{}],9:[function(t,e){"use strict";e.exports=function(t){t.Bubble=function(e,i){return i.type="bubble",new t(e,i)}}},{}],10:[function(t,e){"use strict";e.exports=function(t){t.Doughnut=function(e,i){return i.type="doughnut",new t(e,i)}}},{}],11:[function(t,e){"use strict";e.exports=function(t){t.Line=function(e,i){return i.type="line",new t(e,i)}}},{}],12:[function(t,e){"use strict";e.exports=function(t){t.PolarArea=function(e,i){return i.type="polarArea",new t(e,i)}}},{}],13:[function(t,e){"use strict";e.exports=function(t){t.Radar=function(e,i){return i.options=t.helpers.configMerge({aspectRatio:1},i.options),i.type="radar",new t(e,i)}}},{}],14:[function(t,e){"use strict";e.exports=function(t){var e={hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-1"}],yAxes:[{type:"linear",position:"left",id:"y-axis-1"}]},tooltips:{callbacks:{title:function(){return""},label:function(t){return"("+t.xLabel+", "+t.yLabel+")"}}}};t.defaults.scatter=e,t.controllers.scatter=t.controllers.line,t.Scatter=function(e,i){return i.type="scatter",new t(e,i)}}},{}],15:[function(t,e){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.bar={hover:{mode:"label"},scales:{xAxes:[{type:"category",categoryPercentage:.8,barPercentage:.9,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}},t.controllers.bar=t.DatasetController.extend({dataElementType:t.elements.Rectangle,initialize:function(e,i){t.DatasetController.prototype.initialize.call(this,e,i),this.getMeta().bar=!0},getBarCount:function(){var t=this,i=0;return e.each(t.chart.data.datasets,function(e,n){var r=t.chart.getDatasetMeta(n);r.bar&&t.chart.isDatasetVisible(n)&&++i},t),i},update:function(t){var i=this;e.each(i.getMeta().data,function(e,n){i.updateElement(e,n,t)},i)},updateElement:function(t,i,n){var r=this,o=r.getMeta(),s=r.getScaleForId(o.xAxisID),a=r.getScaleForId(o.yAxisID),l=a.getBasePixel(),u=r.chart.options.elements.rectangle,c=t.custom||{},h=r.getDataset();e.extend(t,{_xScale:s,_yScale:a,_datasetIndex:r.index,_index:i,_model:{x:r.calculateBarX(i,r.index),y:n?l:r.calculateBarY(i,r.index),label:r.chart.data.labels[i],datasetLabel:h.label,base:n?l:r.calculateBarBase(r.index,i),width:r.calculateBarWidth(i),backgroundColor:c.backgroundColor?c.backgroundColor:e.getValueAtIndexOrDefault(h.backgroundColor,i,u.backgroundColor),borderSkipped:c.borderSkipped?c.borderSkipped:u.borderSkipped,borderColor:c.borderColor?c.borderColor:e.getValueAtIndexOrDefault(h.borderColor,i,u.borderColor),borderWidth:c.borderWidth?c.borderWidth:e.getValueAtIndexOrDefault(h.borderWidth,i,u.borderWidth)}}),t.pivot()},calculateBarBase:function(t,e){var i=this,n=i.getMeta(),r=i.getScaleForId(n.yAxisID),o=0;if(r.options.stacked){for(var s=i.chart,a=s.data.datasets,l=Number(a[t].data[e]),u=0;u<t;u++){var c=a[u],h=s.getDatasetMeta(u);if(h.bar&&h.yAxisID===r.id&&s.isDatasetVisible(u)){var d=Number(c.data[e]);o+=l<0?Math.min(d,0):Math.max(d,0)}}return r.getPixelForValue(o)}return r.getBasePixel()},getRuler:function(t){var e,i=this,n=i.getMeta(),r=i.getScaleForId(n.xAxisID),o=i.getBarCount();e="category"===r.options.type?r.getPixelForTick(t+1)-r.getPixelForTick(t):r.width/r.ticks.length;var s=e*r.options.categoryPercentage,a=(e-e*r.options.categoryPercentage)/2,l=s/o;if(r.ticks.length!==i.chart.data.labels.length){var u=r.ticks.length/i.chart.data.labels.length;l*=u}var c=l*r.options.barPercentage,h=l-l*r.options.barPercentage;return{datasetCount:o,tickWidth:e,categoryWidth:s,categorySpacing:a,fullBarWidth:l,barWidth:c,barSpacing:h}},calculateBarWidth:function(t){var e=this.getScaleForId(this.getMeta().xAxisID);if(e.options.barThickness)return e.options.barThickness;var i=this.getRuler(t);return e.options.stacked?i.categoryWidth:i.barWidth},getBarIndex:function(t){var e,i,n=0;for(i=0;i<t;++i)e=this.chart.getDatasetMeta(i),e.bar&&this.chart.isDatasetVisible(i)&&++n;return n},calculateBarX:function(t,e){var i=this,n=i.getMeta(),r=i.getScaleForId(n.xAxisID),o=i.getBarIndex(e),s=i.getRuler(t),a=r.getPixelForValue(null,t,e,i.chart.isCombo);return a-=i.chart.isCombo?s.tickWidth/2:0,r.options.stacked?a+s.categoryWidth/2+s.categorySpacing:a+s.barWidth/2+s.categorySpacing+s.barWidth*o+s.barSpacing/2+s.barSpacing*o},calculateBarY:function(t,e){var i=this,n=i.getMeta(),r=i.getScaleForId(n.yAxisID),o=Number(i.getDataset().data[t]);if(r.options.stacked){for(var s=0,a=0,l=0;l<e;l++){var u=i.chart.data.datasets[l],c=i.chart.getDatasetMeta(l);if(c.bar&&c.yAxisID===r.id&&i.chart.isDatasetVisible(l)){var h=Number(u.data[t]);h<0?a+=h||0:s+=h||0}}return o<0?r.getPixelForValue(a+o):r.getPixelForValue(s+o)}return r.getPixelForValue(o)},draw:function(t){var i=this,n=t||1;e.each(i.getMeta().data,function(t,e){var r=i.getDataset().data[e];null===r||void 0===r||isNaN(r)||t.transition(n).draw()},i)},setHoverStyle:function(t){var i=this.chart.data.datasets[t._datasetIndex],n=t._index,r=t.custom||{},o=t._model;o.backgroundColor=r.hoverBackgroundColor?r.hoverBackgroundColor:e.getValueAtIndexOrDefault(i.hoverBackgroundColor,n,e.getHoverColor(o.backgroundColor)),o.borderColor=r.hoverBorderColor?r.hoverBorderColor:e.getValueAtIndexOrDefault(i.hoverBorderColor,n,e.getHoverColor(o.borderColor)),o.borderWidth=r.hoverBorderWidth?r.hoverBorderWidth:e.getValueAtIndexOrDefault(i.hoverBorderWidth,n,o.borderWidth)},removeHoverStyle:function(t){var i=this.chart.data.datasets[t._datasetIndex],n=t._index,r=t.custom||{},o=t._model,s=this.chart.options.elements.rectangle;o.backgroundColor=r.backgroundColor?r.backgroundColor:e.getValueAtIndexOrDefault(i.backgroundColor,n,s.backgroundColor),o.borderColor=r.borderColor?r.borderColor:e.getValueAtIndexOrDefault(i.borderColor,n,s.borderColor),o.borderWidth=r.borderWidth?r.borderWidth:e.getValueAtIndexOrDefault(i.borderWidth,n,s.borderWidth)}}),t.defaults.horizontalBar={hover:{mode:"label"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{position:"left",type:"category",categoryPercentage:.8,barPercentage:.9,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{callbacks:{title:function(t,e){var i="";return t.length>0&&(t[0].yLabel?i=t[0].yLabel:e.labels.length>0&&t[0].index<e.labels.length&&(i=e.labels[t[0].index])),i},label:function(t,e){var i=e.datasets[t.datasetIndex].label||"";return i+": "+t.xLabel}}}},t.controllers.horizontalBar=t.controllers.bar.extend({updateElement:function(t,i,n){var r=this,o=r.getMeta(),s=r.getScaleForId(o.xAxisID),a=r.getScaleForId(o.yAxisID),l=s.getBasePixel(),u=t.custom||{},c=r.getDataset(),h=r.chart.options.elements.rectangle;e.extend(t,{_xScale:s,_yScale:a,_datasetIndex:r.index,_index:i,_model:{x:n?l:r.calculateBarX(i,r.index),y:r.calculateBarY(i,r.index),label:r.chart.data.labels[i],datasetLabel:c.label,base:n?l:r.calculateBarBase(r.index,i),height:r.calculateBarHeight(i),backgroundColor:u.backgroundColor?u.backgroundColor:e.getValueAtIndexOrDefault(c.backgroundColor,i,h.backgroundColor),borderSkipped:u.borderSkipped?u.borderSkipped:h.borderSkipped,borderColor:u.borderColor?u.borderColor:e.getValueAtIndexOrDefault(c.borderColor,i,h.borderColor),borderWidth:u.borderWidth?u.borderWidth:e.getValueAtIndexOrDefault(c.borderWidth,i,h.borderWidth)},draw:function(){function t(t){return l[(c+t)%4]}var e=this._chart.ctx,i=this._view,n=i.height/2,r=i.y-n,o=i.y+n,s=i.base-(i.base-i.x),a=i.borderWidth/2;i.borderWidth&&(r+=a,o-=a,s+=a),e.beginPath(),e.fillStyle=i.backgroundColor,e.strokeStyle=i.borderColor,e.lineWidth=i.borderWidth;var l=[[i.base,o],[i.base,r],[s,r],[s,o]],u=["bottom","left","top","right"],c=u.indexOf(i.borderSkipped,0);c===-1&&(c=0),e.moveTo.apply(e,t(0));for(var h=1;h<4;h++)e.lineTo.apply(e,t(h));e.fill(),i.borderWidth&&e.stroke()},inRange:function(t,e){var i=this._view,n=!1;return i&&(n=i.x<i.base?e>=i.y-i.height/2&&e<=i.y+i.height/2&&t>=i.x&&t<=i.base:e>=i.y-i.height/2&&e<=i.y+i.height/2&&t>=i.base&&t<=i.x),n}}),t.pivot()},calculateBarBase:function(t,e){var i=this,n=i.getMeta(),r=i.getScaleForId(n.xAxisID),o=0;if(r.options.stacked){for(var s=i.chart,a=s.data.datasets,l=Number(a[t].data[e]),u=0;u<t;u++){var c=a[u],h=s.getDatasetMeta(u);if(h.bar&&h.xAxisID===r.id&&s.isDatasetVisible(u)){var d=Number(c.data[e]);o+=l<0?Math.min(d,0):Math.max(d,0)}}return r.getPixelForValue(o)}return r.getBasePixel()},getRuler:function(t){var e,i=this,n=i.getMeta(),r=i.getScaleForId(n.yAxisID),o=i.getBarCount();e="category"===r.options.type?r.getPixelForTick(t+1)-r.getPixelForTick(t):r.width/r.ticks.length;var s=e*r.options.categoryPercentage,a=(e-e*r.options.categoryPercentage)/2,l=s/o;if(r.ticks.length!==i.chart.data.labels.length){var u=r.ticks.length/i.chart.data.labels.length;l*=u}var c=l*r.options.barPercentage,h=l-l*r.options.barPercentage;return{datasetCount:o,tickHeight:e,categoryHeight:s,categorySpacing:a,fullBarHeight:l,barHeight:c,barSpacing:h}},calculateBarHeight:function(t){var e=this,i=e.getScaleForId(e.getMeta().yAxisID);if(i.options.barThickness)return i.options.barThickness;var n=e.getRuler(t);return i.options.stacked?n.categoryHeight:n.barHeight},calculateBarX:function(t,e){var i=this,n=i.getMeta(),r=i.getScaleForId(n.xAxisID),o=Number(i.getDataset().data[t]);if(r.options.stacked){for(var s=0,a=0,l=0;l<e;l++){var u=i.chart.data.datasets[l],c=i.chart.getDatasetMeta(l);if(c.bar&&c.xAxisID===r.id&&i.chart.isDatasetVisible(l)){var h=Number(u.data[t]);h<0?a+=h||0:s+=h||0}}return o<0?r.getPixelForValue(a+o):r.getPixelForValue(s+o)}return r.getPixelForValue(o)},calculateBarY:function(t,e){var i=this,n=i.getMeta(),r=i.getScaleForId(n.yAxisID),o=i.getBarIndex(e),s=i.getRuler(t),a=r.getPixelForValue(null,t,e,i.chart.isCombo);return a-=i.chart.isCombo?s.tickHeight/2:0,r.options.stacked?a+s.categoryHeight/2+s.categorySpacing:a+s.barHeight/2+s.categorySpacing+s.barHeight*o+s.barSpacing/2+s.barSpacing*o}})}},{}],16:[function(t,e){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.bubble={hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-0"}],yAxes:[{type:"linear",position:"left",id:"y-axis-0"}]},tooltips:{callbacks:{title:function(){return""},label:function(t,e){var i=e.datasets[t.datasetIndex].label||"",n=e.datasets[t.datasetIndex].data[t.index];return i+": ("+n.x+", "+n.y+", "+n.r+")"}}}},t.controllers.bubble=t.DatasetController.extend({dataElementType:t.elements.Point,update:function(t){var i=this,n=i.getMeta(),r=n.data;e.each(r,function(e,n){i.updateElement(e,n,t)})},updateElement:function(i,n,r){var o=this,s=o.getMeta(),a=o.getScaleForId(s.xAxisID),l=o.getScaleForId(s.yAxisID),u=i.custom||{},c=o.getDataset(),h=c.data[n],d=o.chart.options.elements.point,p=o.index;e.extend(i,{_xScale:a,_yScale:l,_datasetIndex:p,_index:n,_model:{x:r?a.getPixelForDecimal(.5):a.getPixelForValue("object"==typeof h?h:NaN,n,p,o.chart.isCombo),y:r?l.getBasePixel():l.getPixelForValue(h,n,p),radius:r?0:u.radius?u.radius:o.getRadius(h),hitRadius:u.hitRadius?u.hitRadius:e.getValueAtIndexOrDefault(c.hitRadius,n,d.hitRadius)}}),t.DatasetController.prototype.removeHoverStyle.call(o,i,d);var f=i._model;f.skip=u.skip?u.skip:isNaN(f.x)||isNaN(f.y),i.pivot()},getRadius:function(t){return t.r||this.chart.options.elements.point.radius},setHoverStyle:function(i){var n=this;t.DatasetController.prototype.setHoverStyle.call(n,i);var r=n.chart.data.datasets[i._datasetIndex],o=i._index,s=i.custom||{},a=i._model;a.radius=s.hoverRadius?s.hoverRadius:e.getValueAtIndexOrDefault(r.hoverRadius,o,n.chart.options.elements.point.hoverRadius)+n.getRadius(r.data[o])},removeHoverStyle:function(e){var i=this;t.DatasetController.prototype.removeHoverStyle.call(i,e,i.chart.options.elements.point);var n=i.chart.data.datasets[e._datasetIndex].data[e._index],r=e.custom||{},o=e._model;o.radius=r.radius?r.radius:i.getRadius(n)}})}},{}],17:[function(t,e){"use strict";e.exports=function(t){var e=t.helpers,i=t.defaults;i.doughnut={animation:{animateRotate:!0,animateScale:!1},aspectRatio:1,hover:{mode:"single"},legendCallback:function(t){var e=[];e.push('<ul class="'+t.id+'-legend">');var i=t.data,n=i.datasets,r=i.labels;if(n.length)for(var o=0;o<n[0].data.length;++o)e.push('<li><span style="background-color:'+n[0].backgroundColor[o]+'"></span>'),r[o]&&e.push(r[o]),e.push("</li>");return e.push("</ul>"),e.join("")},legend:{labels:{generateLabels:function(t){var i=t.data;return i.labels.length&&i.datasets.length?i.labels.map(function(n,r){var o=t.getDatasetMeta(0),s=i.datasets[0],a=o.data[r],l=a&&a.custom||{},u=e.getValueAtIndexOrDefault,c=t.options.elements.arc,h=l.backgroundColor?l.backgroundColor:u(s.backgroundColor,r,c.backgroundColor),d=l.borderColor?l.borderColor:u(s.borderColor,r,c.borderColor),p=l.borderWidth?l.borderWidth:u(s.borderWidth,r,c.borderWidth);return{text:n,fillStyle:h,strokeStyle:d,lineWidth:p,hidden:isNaN(s.data[r])||o.data[r].hidden,index:r}}):[]}},onClick:function(t,e){var i,n,r,o=e.index,s=this.chart;for(i=0,n=(s.data.datasets||[]).length;i<n;++i)r=s.getDatasetMeta(i),r.data[o].hidden=!r.data[o].hidden;s.update()}},cutoutPercentage:50,rotation:Math.PI*-.5,circumference:2*Math.PI,tooltips:{callbacks:{title:function(){return""},label:function(t,e){return e.labels[t.index]+": "+e.datasets[t.datasetIndex].data[t.index]}}}},i.pie=e.clone(i.doughnut),e.extend(i.pie,{cutoutPercentage:0}),t.controllers.doughnut=t.controllers.pie=t.DatasetController.extend({dataElementType:t.elements.Arc,linkScales:e.noop,getRingIndex:function(t){for(var e=0,i=0;i<t;++i)this.chart.isDatasetVisible(i)&&++e;return e},update:function(t){var i=this,n=i.chart,r=n.chartArea,o=n.options,s=o.elements.arc,a=r.right-r.left-s.borderWidth,l=r.bottom-r.top-s.borderWidth,u=Math.min(a,l),c={x:0,y:0},h=i.getMeta(),d=o.cutoutPercentage,p=o.circumference;if(p<2*Math.PI){var f=o.rotation%(2*Math.PI);f+=2*Math.PI*(f>=Math.PI?-1:f<-Math.PI?1:0);var m=f+p,g={x:Math.cos(f),y:Math.sin(f)},v={x:Math.cos(m),y:Math.sin(m)},y=f<=0&&0<=m||f<=2*Math.PI&&2*Math.PI<=m,b=f<=.5*Math.PI&&.5*Math.PI<=m||f<=2.5*Math.PI&&2.5*Math.PI<=m,_=f<=-Math.PI&&-Math.PI<=m||f<=Math.PI&&Math.PI<=m,w=f<=.5*-Math.PI&&.5*-Math.PI<=m||f<=1.5*Math.PI&&1.5*Math.PI<=m,x=d/100,k={x:_?-1:Math.min(g.x*(g.x<0?1:x),v.x*(v.x<0?1:x)),y:w?-1:Math.min(g.y*(g.y<0?1:x),v.y*(v.y<0?1:x))},C={x:y?1:Math.max(g.x*(g.x>0?1:x),v.x*(v.x>0?1:x)),y:b?1:Math.max(g.y*(g.y>0?1:x),v.y*(v.y>0?1:x))},M={width:.5*(C.x-k.x),height:.5*(C.y-k.y)};u=Math.min(a/M.width,l/M.height),c={x:(C.x+k.x)*-.5,y:(C.y+k.y)*-.5}}n.borderWidth=i.getMaxBorderWidth(h.data),n.outerRadius=Math.max((u-n.borderWidth)/2,0),n.innerRadius=Math.max(d?n.outerRadius/100*d:1,0),n.radiusLength=(n.outerRadius-n.innerRadius)/n.getVisibleDatasetCount(),n.offsetX=c.x*n.outerRadius,n.offsetY=c.y*n.outerRadius,h.total=i.calculateTotal(),i.outerRadius=n.outerRadius-n.radiusLength*i.getRingIndex(i.index),i.innerRadius=i.outerRadius-n.radiusLength,e.each(h.data,function(e,n){i.updateElement(e,n,t)})},updateElement:function(t,i,n){var r=this,o=r.chart,s=o.chartArea,a=o.options,l=a.animation,u=(s.left+s.right)/2,c=(s.top+s.bottom)/2,h=a.rotation,d=a.rotation,p=r.getDataset(),f=n&&l.animateRotate?0:t.hidden?0:r.calculateCircumference(p.data[i])*(a.circumference/(2*Math.PI)),m=n&&l.animateScale?0:r.innerRadius,g=n&&l.animateScale?0:r.outerRadius,v=e.getValueAtIndexOrDefault;e.extend(t,{_datasetIndex:r.index,_index:i,_model:{x:u+o.offsetX,y:c+o.offsetY,startAngle:h,endAngle:d,circumference:f,outerRadius:g,innerRadius:m,label:v(p.label,i,o.data.labels[i])}});var y=t._model;this.removeHoverStyle(t),n&&l.animateRotate||(0===i?y.startAngle=a.rotation:y.startAngle=r.getMeta().data[i-1]._model.endAngle,y.endAngle=y.startAngle+y.circumference),t.pivot()},removeHoverStyle:function(e){t.DatasetController.prototype.removeHoverStyle.call(this,e,this.chart.options.elements.arc)},calculateTotal:function(){var t,i=this.getDataset(),n=this.getMeta(),r=0;return e.each(n.data,function(e,n){t=i.data[n],isNaN(t)||e.hidden||(r+=Math.abs(t))}),r},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?2*Math.PI*(t/e):0},getMaxBorderWidth:function(t){for(var e,i,n=0,r=this.index,o=t.length,s=0;s<o;s++)e=t[s]._model?t[s]._model.borderWidth:0,i=t[s]._chart?t[s]._chart.config.data.datasets[r].hoverBorderWidth:0,n=e>n?e:n,n=i>n?i:n;return n}})}},{}],18:[function(t,e){"use strict";e.exports=function(t){function e(t,e){return i.getValueOrDefault(t.showLine,e.showLines)}var i=t.helpers;t.defaults.line={showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}},t.controllers.line=t.DatasetController.extend({datasetElementType:t.elements.Line,dataElementType:t.elements.Point,addElementAndReset:function(i){var n=this,r=n.chart.options,o=n.getMeta();t.DatasetController.prototype.addElementAndReset.call(n,i),e(n.getDataset(),r)&&0!==o.dataset._model.tension&&n.updateBezierControlPoints()},update:function(t){var n,r,o,s=this,a=s.getMeta(),l=a.dataset,u=a.data||[],c=s.chart.options,h=c.elements.line,d=s.getScaleForId(a.yAxisID),p=s.getDataset(),f=e(p,c);for(f&&(o=l.custom||{},void 0!==p.tension&&void 0===p.lineTension&&(p.lineTension=p.tension),l._scale=d,l._datasetIndex=s.index,l._children=u,l._model={spanGaps:p.spanGaps?p.spanGaps:c.spanGaps,tension:o.tension?o.tension:i.getValueOrDefault(p.lineTension,h.tension),backgroundColor:o.backgroundColor?o.backgroundColor:p.backgroundColor||h.backgroundColor,borderWidth:o.borderWidth?o.borderWidth:p.borderWidth||h.borderWidth,borderColor:o.borderColor?o.borderColor:p.borderColor||h.borderColor,borderCapStyle:o.borderCapStyle?o.borderCapStyle:p.borderCapStyle||h.borderCapStyle,borderDash:o.borderDash?o.borderDash:p.borderDash||h.borderDash,borderDashOffset:o.borderDashOffset?o.borderDashOffset:p.borderDashOffset||h.borderDashOffset,borderJoinStyle:o.borderJoinStyle?o.borderJoinStyle:p.borderJoinStyle||h.borderJoinStyle,fill:o.fill?o.fill:void 0!==p.fill?p.fill:h.fill,steppedLine:o.steppedLine?o.steppedLine:i.getValueOrDefault(p.steppedLine,h.stepped),cubicInterpolationMode:o.cubicInterpolationMode?o.cubicInterpolationMode:i.getValueOrDefault(p.cubicInterpolationMode,h.cubicInterpolationMode),scaleTop:d.top,scaleBottom:d.bottom,scaleZero:d.getBasePixel()},l.pivot()),n=0,r=u.length;n<r;++n)s.updateElement(u[n],n,t);for(f&&0!==l._model.tension&&s.updateBezierControlPoints(),n=0,r=u.length;n<r;++n)u[n].pivot()},getPointBackgroundColor:function(t,e){var n=this.chart.options.elements.point.backgroundColor,r=this.getDataset(),o=t.custom||{};return o.backgroundColor?n=o.backgroundColor:r.pointBackgroundColor?n=i.getValueAtIndexOrDefault(r.pointBackgroundColor,e,n):r.backgroundColor&&(n=r.backgroundColor),n},getPointBorderColor:function(t,e){var n=this.chart.options.elements.point.borderColor,r=this.getDataset(),o=t.custom||{};return o.borderColor?n=o.borderColor:r.pointBorderColor?n=i.getValueAtIndexOrDefault(r.pointBorderColor,e,n):r.borderColor&&(n=r.borderColor),n},getPointBorderWidth:function(t,e){var n=this.chart.options.elements.point.borderWidth,r=this.getDataset(),o=t.custom||{};return o.borderWidth?n=o.borderWidth:r.pointBorderWidth?n=i.getValueAtIndexOrDefault(r.pointBorderWidth,e,n):r.borderWidth&&(n=r.borderWidth),n},updateElement:function(t,e,n){var r,o,s=this,a=s.getMeta(),l=t.custom||{},u=s.getDataset(),c=s.index,h=u.data[e],d=s.getScaleForId(a.yAxisID),p=s.getScaleForId(a.xAxisID),f=s.chart.options.elements.point,m=s.chart.data.labels||[],g=1===m.length||1===u.data.length||s.chart.isCombo;void 0!==u.radius&&void 0===u.pointRadius&&(u.pointRadius=u.radius),void 0!==u.hitRadius&&void 0===u.pointHitRadius&&(u.pointHitRadius=u.hitRadius),r=p.getPixelForValue("object"==typeof h?h:NaN,e,c,g),o=n?d.getBasePixel():s.calculatePointY(h,e,c),t._xScale=p,t._yScale=d,t._datasetIndex=c,t._index=e,t._model={x:r,y:o,skip:l.skip||isNaN(r)||isNaN(o),radius:l.radius||i.getValueAtIndexOrDefault(u.pointRadius,e,f.radius),pointStyle:l.pointStyle||i.getValueAtIndexOrDefault(u.pointStyle,e,f.pointStyle),backgroundColor:s.getPointBackgroundColor(t,e),borderColor:s.getPointBorderColor(t,e),borderWidth:s.getPointBorderWidth(t,e),tension:a.dataset._model?a.dataset._model.tension:0,steppedLine:!!a.dataset._model&&a.dataset._model.steppedLine,hitRadius:l.hitRadius||i.getValueAtIndexOrDefault(u.pointHitRadius,e,f.hitRadius)}},calculatePointY:function(t,e,i){var n,r,o,s=this,a=s.chart,l=s.getMeta(),u=s.getScaleForId(l.yAxisID),c=0,h=0;if(u.options.stacked){for(n=0;n<i;n++)if(r=a.data.datasets[n],o=a.getDatasetMeta(n),"line"===o.type&&o.yAxisID===u.id&&a.isDatasetVisible(n)){var d=Number(u.getRightValue(r.data[e]));d<0?h+=d||0:c+=d||0}var p=Number(u.getRightValue(t));return p<0?u.getPixelForValue(h+p):u.getPixelForValue(c+p)}return u.getPixelForValue(t)},updateBezierControlPoints:function(){function t(t,e,i){return Math.max(Math.min(t,i),e)}var e=this,n=e.getMeta(),r=e.chart.chartArea,o=n.data||[];n.dataset._model.spanGaps&&(o=o.filter(function(t){return!t._model.skip}));var s,a,l,u,c;if("monotone"==n.dataset._model.cubicInterpolationMode)i.splineCurveMonotone(o);else for(s=0,a=o.length;s<a;++s)l=o[s],u=l._model,c=i.splineCurve(i.previousItem(o,s)._model,u,i.nextItem(o,s)._model,n.dataset._model.tension),u.controlPointPreviousX=c.previous.x,u.controlPointPreviousY=c.previous.y,u.controlPointNextX=c.next.x,u.controlPointNextY=c.next.y;if(e.chart.options.elements.line.capBezierPoints)for(s=0,a=o.length;s<a;++s)u=o[s]._model,u.controlPointPreviousX=t(u.controlPointPreviousX,r.left,r.right),u.controlPointPreviousY=t(u.controlPointPreviousY,r.top,r.bottom),u.controlPointNextX=t(u.controlPointNextX,r.left,r.right),u.controlPointNextY=t(u.controlPointNextY,r.top,r.bottom)},draw:function(t){var i,n,r=this,o=r.getMeta(),s=o.data||[],a=t||1;for(i=0,n=s.length;i<n;++i)s[i].transition(a);for(e(r.getDataset(),r.chart.options)&&o.dataset.transition(a).draw(),i=0,n=s.length;i<n;++i)s[i].draw()},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t._index,r=t.custom||{},o=t._model;o.radius=r.hoverRadius||i.getValueAtIndexOrDefault(e.pointHoverRadius,n,this.chart.options.elements.point.hoverRadius),o.backgroundColor=r.hoverBackgroundColor||i.getValueAtIndexOrDefault(e.pointHoverBackgroundColor,n,i.getHoverColor(o.backgroundColor)),o.borderColor=r.hoverBorderColor||i.getValueAtIndexOrDefault(e.pointHoverBorderColor,n,i.getHoverColor(o.borderColor)),o.borderWidth=r.hoverBorderWidth||i.getValueAtIndexOrDefault(e.pointHoverBorderWidth,n,o.borderWidth)},removeHoverStyle:function(t){var e=this,n=e.chart.data.datasets[t._datasetIndex],r=t._index,o=t.custom||{},s=t._model;void 0!==n.radius&&void 0===n.pointRadius&&(n.pointRadius=n.radius),s.radius=o.radius||i.getValueAtIndexOrDefault(n.pointRadius,r,e.chart.options.elements.point.radius),s.backgroundColor=e.getPointBackgroundColor(t,r),s.borderColor=e.getPointBorderColor(t,r),s.borderWidth=e.getPointBorderWidth(t,r)}})}},{}],19:[function(t,e){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.polarArea={scale:{type:"radialLinear",lineArc:!0,ticks:{beginAtZero:!0}},animation:{animateRotate:!0,animateScale:!0},startAngle:-.5*Math.PI,aspectRatio:1,legendCallback:function(t){var e=[];e.push('<ul class="'+t.id+'-legend">');var i=t.data,n=i.datasets,r=i.labels;if(n.length)for(var o=0;o<n[0].data.length;++o)e.push('<li><span style="background-color:'+n[0].backgroundColor[o]+'">'),r[o]&&e.push(r[o]),e.push("</span></li>");return e.push("</ul>"),e.join("")},legend:{labels:{generateLabels:function(t){var i=t.data;return i.labels.length&&i.datasets.length?i.labels.map(function(n,r){var o=t.getDatasetMeta(0),s=i.datasets[0],a=o.data[r],l=a.custom||{},u=e.getValueAtIndexOrDefault,c=t.options.elements.arc,h=l.backgroundColor?l.backgroundColor:u(s.backgroundColor,r,c.backgroundColor),d=l.borderColor?l.borderColor:u(s.borderColor,r,c.borderColor),p=l.borderWidth?l.borderWidth:u(s.borderWidth,r,c.borderWidth);return{text:n,fillStyle:h,strokeStyle:d,lineWidth:p,hidden:isNaN(s.data[r])||o.data[r].hidden,index:r}}):[]}},onClick:function(t,e){var i,n,r,o=e.index,s=this.chart;for(i=0,n=(s.data.datasets||[]).length;i<n;++i)r=s.getDatasetMeta(i),r.data[o].hidden=!r.data[o].hidden;s.update()}},tooltips:{callbacks:{title:function(){return""},label:function(t,e){return e.labels[t.index]+": "+t.yLabel}}}},t.controllers.polarArea=t.DatasetController.extend({dataElementType:t.elements.Arc,linkScales:e.noop,update:function(t){var i=this,n=i.chart,r=n.chartArea,o=i.getMeta(),s=n.options,a=s.elements.arc,l=Math.min(r.right-r.left,r.bottom-r.top);n.outerRadius=Math.max((l-a.borderWidth/2)/2,0),n.innerRadius=Math.max(s.cutoutPercentage?n.outerRadius/100*s.cutoutPercentage:1,0),n.radiusLength=(n.outerRadius-n.innerRadius)/n.getVisibleDatasetCount(),i.outerRadius=n.outerRadius-n.radiusLength*i.index,i.innerRadius=i.outerRadius-n.radiusLength,o.count=i.countVisibleElements(),e.each(o.data,function(e,n){i.updateElement(e,n,t)})},updateElement:function(t,i,n){for(var r=this,o=r.chart,s=r.getDataset(),a=o.options,l=a.animation,u=o.scale,c=e.getValueAtIndexOrDefault,h=o.data.labels,d=r.calculateCircumference(s.data[i]),p=u.xCenter,f=u.yCenter,m=0,g=r.getMeta(),v=0;v<i;++v)isNaN(s.data[v])||g.data[v].hidden||++m;var y=a.startAngle,b=t.hidden?0:u.getDistanceFromCenterForValue(s.data[i]),_=y+d*m,w=_+(t.hidden?0:d),x=l.animateScale?0:u.getDistanceFromCenterForValue(s.data[i]);e.extend(t,{_datasetIndex:r.index,_index:i,_scale:u,_model:{x:p,y:f,innerRadius:0,outerRadius:n?x:b,startAngle:n&&l.animateRotate?y:_,endAngle:n&&l.animateRotate?y:w,label:c(h,i,h[i])}}),r.removeHoverStyle(t),t.pivot()},removeHoverStyle:function(e){t.DatasetController.prototype.removeHoverStyle.call(this,e,this.chart.options.elements.arc)},countVisibleElements:function(){var t=this.getDataset(),i=this.getMeta(),n=0;return e.each(i.data,function(e,i){isNaN(t.data[i])||e.hidden||n++}),n},calculateCircumference:function(t){var e=this.getMeta().count;return e>0&&!isNaN(t)?2*Math.PI/e:0}})}},{}],20:[function(t,e){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.radar={scale:{type:"radialLinear"},elements:{line:{tension:0}}},t.controllers.radar=t.DatasetController.extend({datasetElementType:t.elements.Line,dataElementType:t.elements.Point,linkScales:e.noop,addElementAndReset:function(e){t.DatasetController.prototype.addElementAndReset.call(this,e),this.updateBezierControlPoints();
},update:function(t){var i=this,n=i.getMeta(),r=n.dataset,o=n.data,s=r.custom||{},a=i.getDataset(),l=i.chart.options.elements.line,u=i.chart.scale;void 0!==a.tension&&void 0===a.lineTension&&(a.lineTension=a.tension),e.extend(n.dataset,{_datasetIndex:i.index,_children:o,_loop:!0,_model:{tension:s.tension?s.tension:e.getValueOrDefault(a.lineTension,l.tension),backgroundColor:s.backgroundColor?s.backgroundColor:a.backgroundColor||l.backgroundColor,borderWidth:s.borderWidth?s.borderWidth:a.borderWidth||l.borderWidth,borderColor:s.borderColor?s.borderColor:a.borderColor||l.borderColor,fill:s.fill?s.fill:void 0!==a.fill?a.fill:l.fill,borderCapStyle:s.borderCapStyle?s.borderCapStyle:a.borderCapStyle||l.borderCapStyle,borderDash:s.borderDash?s.borderDash:a.borderDash||l.borderDash,borderDashOffset:s.borderDashOffset?s.borderDashOffset:a.borderDashOffset||l.borderDashOffset,borderJoinStyle:s.borderJoinStyle?s.borderJoinStyle:a.borderJoinStyle||l.borderJoinStyle,scaleTop:u.top,scaleBottom:u.bottom,scaleZero:u.getBasePosition()}}),n.dataset.pivot(),e.each(o,function(e,n){i.updateElement(e,n,t)},i),i.updateBezierControlPoints()},updateElement:function(t,i,n){var r=this,o=t.custom||{},s=r.getDataset(),a=r.chart.scale,l=r.chart.options.elements.point,u=a.getPointPositionForValue(i,s.data[i]);e.extend(t,{_datasetIndex:r.index,_index:i,_scale:a,_model:{x:n?a.xCenter:u.x,y:n?a.yCenter:u.y,tension:o.tension?o.tension:e.getValueOrDefault(s.tension,r.chart.options.elements.line.tension),radius:o.radius?o.radius:e.getValueAtIndexOrDefault(s.pointRadius,i,l.radius),backgroundColor:o.backgroundColor?o.backgroundColor:e.getValueAtIndexOrDefault(s.pointBackgroundColor,i,l.backgroundColor),borderColor:o.borderColor?o.borderColor:e.getValueAtIndexOrDefault(s.pointBorderColor,i,l.borderColor),borderWidth:o.borderWidth?o.borderWidth:e.getValueAtIndexOrDefault(s.pointBorderWidth,i,l.borderWidth),pointStyle:o.pointStyle?o.pointStyle:e.getValueAtIndexOrDefault(s.pointStyle,i,l.pointStyle),hitRadius:o.hitRadius?o.hitRadius:e.getValueAtIndexOrDefault(s.hitRadius,i,l.hitRadius)}}),t._model.skip=o.skip?o.skip:isNaN(t._model.x)||isNaN(t._model.y)},updateBezierControlPoints:function(){var t=this.chart.chartArea,i=this.getMeta();e.each(i.data,function(n,r){var o=n._model,s=e.splineCurve(e.previousItem(i.data,r,!0)._model,o,e.nextItem(i.data,r,!0)._model,o.tension);o.controlPointPreviousX=Math.max(Math.min(s.previous.x,t.right),t.left),o.controlPointPreviousY=Math.max(Math.min(s.previous.y,t.bottom),t.top),o.controlPointNextX=Math.max(Math.min(s.next.x,t.right),t.left),o.controlPointNextY=Math.max(Math.min(s.next.y,t.bottom),t.top),n.pivot()})},draw:function(t){var i=this.getMeta(),n=t||1;e.each(i.data,function(t){t.transition(n)}),i.dataset.transition(n).draw(),e.each(i.data,function(t){t.draw()})},setHoverStyle:function(t){var i=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},r=t._index,o=t._model;o.radius=n.hoverRadius?n.hoverRadius:e.getValueAtIndexOrDefault(i.pointHoverRadius,r,this.chart.options.elements.point.hoverRadius),o.backgroundColor=n.hoverBackgroundColor?n.hoverBackgroundColor:e.getValueAtIndexOrDefault(i.pointHoverBackgroundColor,r,e.getHoverColor(o.backgroundColor)),o.borderColor=n.hoverBorderColor?n.hoverBorderColor:e.getValueAtIndexOrDefault(i.pointHoverBorderColor,r,e.getHoverColor(o.borderColor)),o.borderWidth=n.hoverBorderWidth?n.hoverBorderWidth:e.getValueAtIndexOrDefault(i.pointHoverBorderWidth,r,o.borderWidth)},removeHoverStyle:function(t){var i=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},r=t._index,o=t._model,s=this.chart.options.elements.point;o.radius=n.radius?n.radius:e.getValueAtIndexOrDefault(i.radius,r,s.radius),o.backgroundColor=n.backgroundColor?n.backgroundColor:e.getValueAtIndexOrDefault(i.pointBackgroundColor,r,s.backgroundColor),o.borderColor=n.borderColor?n.borderColor:e.getValueAtIndexOrDefault(i.pointBorderColor,r,s.borderColor),o.borderWidth=n.borderWidth?n.borderWidth:e.getValueAtIndexOrDefault(i.pointBorderWidth,r,s.borderWidth)}})}},{}],21:[function(t,e){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.global.animation={duration:1e3,easing:"easeOutQuart",onProgress:e.noop,onComplete:e.noop},t.Animation=t.Element.extend({currentStep:null,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),t.animationService={frameDuration:17,animations:[],dropFrames:0,request:null,addAnimation:function(t,e,i,n){var r=this;n||(t.animating=!0);for(var o=0;o<r.animations.length;++o)if(r.animations[o].chartInstance===t)return void(r.animations[o].animationObject=e);r.animations.push({chartInstance:t,animationObject:e}),1===r.animations.length&&r.requestAnimationFrame()},cancelAnimation:function(t){var i=e.findIndex(this.animations,function(e){return e.chartInstance===t});i!==-1&&(this.animations.splice(i,1),t.animating=!1)},requestAnimationFrame:function(){var t=this;null===t.request&&(t.request=e.requestAnimFrame.call(window,function(){t.request=null,t.startDigest()}))},startDigest:function(){var t=this,e=Date.now(),i=0;t.dropFrames>1&&(i=Math.floor(t.dropFrames),t.dropFrames=t.dropFrames%1);for(var n=0;n<t.animations.length;)null===t.animations[n].animationObject.currentStep&&(t.animations[n].animationObject.currentStep=0),t.animations[n].animationObject.currentStep+=1+i,t.animations[n].animationObject.currentStep>t.animations[n].animationObject.numSteps&&(t.animations[n].animationObject.currentStep=t.animations[n].animationObject.numSteps),t.animations[n].animationObject.render(t.animations[n].chartInstance,t.animations[n].animationObject),t.animations[n].animationObject.onAnimationProgress&&t.animations[n].animationObject.onAnimationProgress.call&&t.animations[n].animationObject.onAnimationProgress.call(t.animations[n].chartInstance,t.animations[n]),t.animations[n].animationObject.currentStep===t.animations[n].animationObject.numSteps?(t.animations[n].animationObject.onAnimationComplete&&t.animations[n].animationObject.onAnimationComplete.call&&t.animations[n].animationObject.onAnimationComplete.call(t.animations[n].chartInstance,t.animations[n]),t.animations[n].chartInstance.animating=!1,t.animations.splice(n,1)):++n;var r=Date.now(),o=(r-e)/t.frameDuration;t.dropFrames+=o,t.animations.length>0&&t.requestAnimationFrame()}}}},{}],22:[function(t,e){"use strict";e.exports=function(t){var e=t.canvasHelpers={};e.drawPoint=function(t,e,i,n,r){var o,s,a,l,u,c;if("object"==typeof e&&(o=e.toString(),"[object HTMLImageElement]"===o||"[object HTMLCanvasElement]"===o))return void t.drawImage(e,n-e.width/2,r-e.height/2);if(!(isNaN(i)||i<=0)){switch(e){default:t.beginPath(),t.arc(n,r,i,0,2*Math.PI),t.closePath(),t.fill();break;case"triangle":t.beginPath(),s=3*i/Math.sqrt(3),u=s*Math.sqrt(3)/2,t.moveTo(n-s/2,r+u/3),t.lineTo(n+s/2,r+u/3),t.lineTo(n,r-2*u/3),t.closePath(),t.fill();break;case"rect":c=1/Math.SQRT2*i,t.beginPath(),t.fillRect(n-c,r-c,2*c,2*c),t.strokeRect(n-c,r-c,2*c,2*c);break;case"rectRot":c=1/Math.SQRT2*i,t.beginPath(),t.moveTo(n-c,r),t.lineTo(n,r+c),t.lineTo(n+c,r),t.lineTo(n,r-c),t.closePath(),t.fill();break;case"cross":t.beginPath(),t.moveTo(n,r+i),t.lineTo(n,r-i),t.moveTo(n-i,r),t.lineTo(n+i,r),t.closePath();break;case"crossRot":t.beginPath(),a=Math.cos(Math.PI/4)*i,l=Math.sin(Math.PI/4)*i,t.moveTo(n-a,r-l),t.lineTo(n+a,r+l),t.moveTo(n-a,r+l),t.lineTo(n+a,r-l),t.closePath();break;case"star":t.beginPath(),t.moveTo(n,r+i),t.lineTo(n,r-i),t.moveTo(n-i,r),t.lineTo(n+i,r),a=Math.cos(Math.PI/4)*i,l=Math.sin(Math.PI/4)*i,t.moveTo(n-a,r-l),t.lineTo(n+a,r+l),t.moveTo(n-a,r+l),t.lineTo(n+a,r-l),t.closePath();break;case"line":t.beginPath(),t.moveTo(n-i,r),t.lineTo(n+i,r),t.closePath();break;case"dash":t.beginPath(),t.moveTo(n,r),t.lineTo(n+i,r),t.closePath()}t.stroke()}}}},{}],23:[function(t,e){"use strict";e.exports=function(t){var e=t.helpers;t.types={},t.instances={},t.controllers={},t.Controller=function(i){return this.chart=i,this.config=i.config,this.options=this.config.options=e.configMerge(t.defaults.global,t.defaults[this.config.type],this.config.options||{}),this.id=e.uid(),Object.defineProperty(this,"data",{get:function(){return this.config.data}}),t.instances[this.id]=this,this.options.responsive&&this.resize(!0),this.initialize(),this},e.extend(t.Controller.prototype,{initialize:function(){var e=this;return t.plugins.notify("beforeInit",[e]),e.bindEvents(),e.ensureScalesHaveIDs(),e.buildOrUpdateControllers(),e.buildScales(),e.updateLayout(),e.resetElements(),e.initToolTip(),e.update(),t.plugins.notify("afterInit",[e]),e},clear:function(){return e.clear(this.chart),this},stop:function(){return t.animationService.cancelAnimation(this),this},resize:function(i){var n=this,r=n.chart,o=r.canvas,s=e.getMaximumWidth(o),a=r.aspectRatio,l=n.options.maintainAspectRatio&&isNaN(a)===!1&&isFinite(a)&&0!==a?s/a:e.getMaximumHeight(o),u=r.width!==s||r.height!==l;if(!u)return n;o.width=r.width=s,o.height=r.height=l,e.retinaScale(r);var c={width:s,height:l};return t.plugins.notify("resize",[n,c]),n.options.onResize&&n.options.onResize(n,c),i||(n.stop(),n.update(n.options.responsiveAnimationDuration)),n},ensureScalesHaveIDs:function(){var t=this.options,i=t.scales||{},n=t.scale;e.each(i.xAxes,function(t,e){t.id=t.id||"x-axis-"+e}),e.each(i.yAxes,function(t,e){t.id=t.id||"y-axis-"+e}),n&&(n.id=n.id||"scale")},buildScales:function(){var i=this,n=i.options,r=i.scales={},o=[];n.scales&&(o=o.concat((n.scales.xAxes||[]).map(function(t){return{options:t,dtype:"category"}}),(n.scales.yAxes||[]).map(function(t){return{options:t,dtype:"linear"}}))),n.scale&&o.push({options:n.scale,dtype:"radialLinear",isDefault:!0}),e.each(o,function(n){var o=n.options,s=e.getValueOrDefault(o.type,n.dtype),a=t.scaleService.getScaleConstructor(s);if(a){var l=new a({id:o.id,options:o,ctx:i.chart.ctx,chart:i});r[l.id]=l,n.isDefault&&(i.scale=l)}}),t.scaleService.addScalesToLayout(this)},updateLayout:function(){t.layoutService.update(this,this.chart.width,this.chart.height)},buildOrUpdateControllers:function(){var i=this,n=[],r=[];if(e.each(i.data.datasets,function(e,o){var s=i.getDatasetMeta(o);s.type||(s.type=e.type||i.config.type),n.push(s.type),s.controller?s.controller.updateIndex(o):(s.controller=new t.controllers[s.type](i,o),r.push(s.controller))},i),n.length>1)for(var o=1;o<n.length;o++)if(n[o]!==n[o-1]){i.isCombo=!0;break}return r},resetElements:function(){var t=this;e.each(t.data.datasets,function(e,i){t.getDatasetMeta(i).controller.reset()},t)},update:function(i,n){var r=this;t.plugins.notify("beforeUpdate",[r]),r.tooltip._data=r.data;var o=r.buildOrUpdateControllers();e.each(r.data.datasets,function(t,e){r.getDatasetMeta(e).controller.buildOrUpdateElements()},r),t.layoutService.update(r,r.chart.width,r.chart.height),t.plugins.notify("afterScaleUpdate",[r]),e.each(o,function(t){t.reset()}),r.updateDatasets(),t.plugins.notify("afterUpdate",[r]),r.render(i,n)},updateDatasets:function(){var e,i,n=this;if(t.plugins.notify("beforeDatasetsUpdate",[n])){for(e=0,i=n.data.datasets.length;e<i;++e)n.getDatasetMeta(e).controller.update();t.plugins.notify("afterDatasetsUpdate",[n])}},render:function(i,n){var r=this;t.plugins.notify("beforeRender",[r]);var o=r.options.animation;if(o&&("undefined"!=typeof i&&0!==i||"undefined"==typeof i&&0!==o.duration)){var s=new t.Animation;s.numSteps=(i||o.duration)/16.66,s.easing=o.easing,s.render=function(t,i){var n=e.easingEffects[i.easing],r=i.currentStep/i.numSteps,o=n(r);t.draw(o,r,i.currentStep)},s.onAnimationProgress=o.onProgress,s.onAnimationComplete=o.onComplete,t.animationService.addAnimation(r,s,i,n)}else r.draw(),o&&o.onComplete&&o.onComplete.call&&o.onComplete.call(r);return r},draw:function(i){var n=this,r=i||1;n.clear(),t.plugins.notify("beforeDraw",[n,r]),e.each(n.boxes,function(t){t.draw(n.chartArea)},n),n.scale&&n.scale.draw(),t.plugins.notify("beforeDatasetsDraw",[n,r]),e.each(n.data.datasets,function(t,e){n.isDatasetVisible(e)&&n.getDatasetMeta(e).controller.draw(i)},n,!0),t.plugins.notify("afterDatasetsDraw",[n,r]),n.tooltip.transition(r).draw(),t.plugins.notify("afterDraw",[n,r])},getElementAtEvent:function(t){var i=this,n=e.getRelativePosition(t,i.chart),r=[];return e.each(i.data.datasets,function(t,o){if(i.isDatasetVisible(o)){var s=i.getDatasetMeta(o);e.each(s.data,function(t){if(t.inRange(n.x,n.y))return r.push(t),r})}}),r.slice(0,1)},getElementsAtEvent:function(t){var i=this,n=e.getRelativePosition(t,i.chart),r=[],o=function(){if(i.data.datasets)for(var t=0;t<i.data.datasets.length;t++){var e=i.getDatasetMeta(t);if(i.isDatasetVisible(t))for(var r=0;r<e.data.length;r++)if(e.data[r].inRange(n.x,n.y))return e.data[r]}}.call(i);return o?(e.each(i.data.datasets,function(t,e){if(i.isDatasetVisible(e)){var n=i.getDatasetMeta(e),s=n.data[o._index];s&&!s._view.skip&&r.push(s)}},i),r):r},getElementsAtXAxis:function(t){var i=this,n=e.getRelativePosition(t,i.chart),r=[],o=function(){if(i.data.datasets)for(var t=0;t<i.data.datasets.length;t++){var e=i.getDatasetMeta(t);if(i.isDatasetVisible(t))for(var r=0;r<e.data.length;r++)if(e.data[r].inLabelRange(n.x,n.y))return e.data[r]}}.call(i);return o?(e.each(i.data.datasets,function(t,n){if(i.isDatasetVisible(n)){var s=i.getDatasetMeta(n),a=e.findIndex(s.data,function(t){return o._model.x===t._model.x});a===-1||s.data[a]._view.skip||r.push(s.data[a])}},i),r):r},getElementsAtEventForMode:function(t,e){var i=this;switch(e){case"single":return i.getElementAtEvent(t);case"label":return i.getElementsAtEvent(t);case"dataset":return i.getDatasetAtEvent(t);case"x-axis":return i.getElementsAtXAxis(t);default:return t}},getDatasetAtEvent:function(t){var e=this.getElementAtEvent(t);return e.length>0&&(e=this.getDatasetMeta(e[0]._datasetIndex).data),e},getDatasetMeta:function(t){var e=this,i=e.data.datasets[t];i._meta||(i._meta={});var n=i._meta[e.id];return n||(n=i._meta[e.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),n},getVisibleDatasetCount:function(){for(var t=0,e=0,i=this.data.datasets.length;e<i;++e)this.isDatasetVisible(e)&&t++;return t},isDatasetVisible:function(t){var e=this.getDatasetMeta(t);return"boolean"==typeof e.hidden?!e.hidden:!this.data.datasets[t].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroy:function(){var i=this;i.stop(),i.clear(),e.unbindEvents(i,i.events),e.removeResizeListener(i.chart.canvas.parentNode);var n=i.chart.canvas;n.width=i.chart.width,n.height=i.chart.height,void 0!==i.chart.originalDevicePixelRatio&&i.chart.ctx.scale(1/i.chart.originalDevicePixelRatio,1/i.chart.originalDevicePixelRatio),n.style.width=i.chart.originalCanvasStyleWidth,n.style.height=i.chart.originalCanvasStyleHeight,t.plugins.notify("destroy",[i]),delete t.instances[i.id]},toBase64Image:function(){return this.chart.canvas.toDataURL.apply(this.chart.canvas,arguments)},initToolTip:function(){var e=this;e.tooltip=new t.Tooltip({_chart:e.chart,_chartInstance:e,_data:e.data,_options:e.options.tooltips},e)},bindEvents:function(){var t=this;e.bindEvents(t,t.options.events,function(e){t.eventHandler(e)})},updateHoverStyle:function(t,e,i){var n,r,o,s=i?"setHoverStyle":"removeHoverStyle";switch(e){case"single":t=[t[0]];break;case"label":case"dataset":case"x-axis":break;default:return}for(r=0,o=t.length;r<o;++r)n=t[r],n&&this.getDatasetMeta(n._datasetIndex).controller[s](n)},eventHandler:function(t){var i=this,n=i.tooltip,r=i.options||{},o=r.hover,s=r.tooltips;return i.lastActive=i.lastActive||[],i.lastTooltipActive=i.lastTooltipActive||[],"mouseout"===t.type?(i.active=[],i.tooltipActive=[]):(i.active=i.getElementsAtEventForMode(t,o.mode),i.tooltipActive=i.getElementsAtEventForMode(t,s.mode)),o.onHover&&o.onHover.call(i,i.active),"mouseup"!==t.type&&"click"!==t.type||(r.onClick&&r.onClick.call(i,t,i.active),i.legend&&i.legend.handleEvent&&i.legend.handleEvent(t)),i.lastActive.length&&i.updateHoverStyle(i.lastActive,o.mode,!1),i.active.length&&o.mode&&i.updateHoverStyle(i.active,o.mode,!0),(s.enabled||s.custom)&&(n.initialize(),n._active=i.tooltipActive,n.update(!0)),n.pivot(),i.animating||e.arrayEquals(i.active,i.lastActive)&&e.arrayEquals(i.tooltipActive,i.lastTooltipActive)||(i.stop(),(s.enabled||s.custom)&&n.update(!0),i.render(o.animationDuration,!0)),i.lastActive=i.active,i.lastTooltipActive=i.tooltipActive,i}})}},{}],24:[function(t,e){"use strict";e.exports=function(t){var e=t.helpers,i=e.noop;t.DatasetController=function(t,e){this.initialize.call(this,t,e)},e.extend(t.DatasetController.prototype,{datasetElementType:null,dataElementType:null,initialize:function(t,e){var i=this;i.chart=t,i.index=e,i.linkScales(),i.addElements()},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,e=t.getMeta(),i=t.getDataset();null===e.xAxisID&&(e.xAxisID=i.xAxisID||t.chart.options.scales.xAxes[0].id),null===e.yAxisID&&(e.yAxisID=i.yAxisID||t.chart.options.scales.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return this.chart.scales[t]},reset:function(){this.update(!0)},createMetaDataset:function(){var t=this,e=t.datasetElementType;return e&&new e({_chart:t.chart.chart,_datasetIndex:t.index})},createMetaData:function(t){var e=this,i=e.dataElementType;return i&&new i({_chart:e.chart.chart,_datasetIndex:e.index,_index:t})},addElements:function(){var t,e,i=this,n=i.getMeta(),r=i.getDataset().data||[],o=n.data;for(t=0,e=r.length;t<e;++t)o[t]=o[t]||i.createMetaData(n,t);n.dataset=n.dataset||i.createMetaDataset()},addElementAndReset:function(t){var e=this,i=e.createMetaData(t);e.getMeta().data.splice(t,0,i),e.updateElement(i,t,!0)},buildOrUpdateElements:function(){var t=this.getMeta(),e=t.data,i=this.getDataset().data.length,n=e.length;if(i<n)e.splice(i,n-i);else if(i>n)for(var r=n;r<i;++r)this.addElementAndReset(r)},update:i,draw:function(t){var i=t||1;e.each(this.getMeta().data,function(t){t.transition(i).draw()})},removeHoverStyle:function(t,i){var n=this.chart.data.datasets[t._datasetIndex],r=t._index,o=t.custom||{},s=e.getValueAtIndexOrDefault,a=t._model;a.backgroundColor=o.backgroundColor?o.backgroundColor:s(n.backgroundColor,r,i.backgroundColor),a.borderColor=o.borderColor?o.borderColor:s(n.borderColor,r,i.borderColor),a.borderWidth=o.borderWidth?o.borderWidth:s(n.borderWidth,r,i.borderWidth)},setHoverStyle:function(t){var i=this.chart.data.datasets[t._datasetIndex],n=t._index,r=t.custom||{},o=e.getValueAtIndexOrDefault,s=e.getHoverColor,a=t._model;a.backgroundColor=r.hoverBackgroundColor?r.hoverBackgroundColor:o(i.hoverBackgroundColor,n,s(a.backgroundColor)),a.borderColor=r.hoverBorderColor?r.hoverBorderColor:o(i.hoverBorderColor,n,s(a.borderColor)),a.borderWidth=r.hoverBorderWidth?r.hoverBorderWidth:o(i.hoverBorderWidth,n,a.borderWidth)}}),t.DatasetController.extend=e.inherits}},{}],25:[function(t,e){"use strict";e.exports=function(t){var e=t.helpers;t.elements={},t.Element=function(t){e.extend(this,t),this.initialize.apply(this,arguments)},e.extend(t.Element.prototype,{initialize:function(){this.hidden=!1},pivot:function(){var t=this;return t._view||(t._view=e.clone(t._model)),t._start=e.clone(t._view),t},transition:function(t){var i=this;return i._view||(i._view=e.clone(i._model)),1===t?(i._view=i._model,i._start=null,i):(i._start||i.pivot(),e.each(i._model,function(n,r){if("_"===r[0]);else if(i._view.hasOwnProperty(r))if(n===i._view[r]);else if("string"==typeof n)try{var o=e.color(i._model[r]).mix(e.color(i._start[r]),t);i._view[r]=o.rgbString()}catch(t){i._view[r]=n}else if("number"==typeof n){var s=void 0!==i._start[r]&&isNaN(i._start[r])===!1?i._start[r]:0;i._view[r]=(i._model[r]-s)*t+s}else i._view[r]=n;else"number"!=typeof n||isNaN(i._view[r])?i._view[r]=n:i._view[r]=n*t},i),i)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return e.isNumber(this._model.x)&&e.isNumber(this._model.y)}}),t.Element.extend=e.inherits}},{}],26:[function(t,e){"use strict";var i=t(2);e.exports=function(t){function e(t,e,i){var n;return"string"==typeof t?(n=parseInt(t,10),t.indexOf("%")!=-1&&(n=n/100*e.parentNode[i])):n=t,n}function n(t){return void 0!==t&&null!==t&&"none"!==t}function r(t,i,r){var o=document.defaultView,s=t.parentNode,a=o.getComputedStyle(t)[i],l=o.getComputedStyle(s)[i],u=n(a),c=n(l),h=Number.POSITIVE_INFINITY;return u||c?Math.min(u?e(a,t,r):h,c?e(l,s,r):h):"none"}var o=t.helpers={};o.each=function(t,e,i,n){var r,s;if(o.isArray(t))if(s=t.length,n)for(r=s-1;r>=0;r--)e.call(i,t[r],r);else for(r=0;r<s;r++)e.call(i,t[r],r);else if("object"==typeof t){var a=Object.keys(t);for(s=a.length,r=0;r<s;r++)e.call(i,t[a[r]],a[r])}},o.clone=function(t){var e={};return o.each(t,function(t,i){o.isArray(t)?e[i]=t.slice(0):"object"==typeof t&&null!==t?e[i]=o.clone(t):e[i]=t}),e},o.extend=function(t){for(var e=function(e,i){t[i]=e},i=1,n=arguments.length;i<n;i++)o.each(arguments[i],e);return t},o.configMerge=function(e){var i=o.clone(e);return o.each(Array.prototype.slice.call(arguments,1),function(e){o.each(e,function(e,n){if("scales"===n)i[n]=o.scaleMerge(i.hasOwnProperty(n)?i[n]:{},e);else if("scale"===n)i[n]=o.configMerge(i.hasOwnProperty(n)?i[n]:{},t.scaleService.getScaleDefaults(e.type),e);else if(i.hasOwnProperty(n)&&o.isArray(i[n])&&o.isArray(e)){var r=i[n];o.each(e,function(t,e){e<r.length?"object"==typeof r[e]&&null!==r[e]&&"object"==typeof t&&null!==t?r[e]=o.configMerge(r[e],t):r[e]=t:r.push(t)})}else i.hasOwnProperty(n)&&"object"==typeof i[n]&&null!==i[n]&&"object"==typeof e?i[n]=o.configMerge(i[n],e):i[n]=e})}),i},o.scaleMerge=function(e,i){var n=o.clone(e);return o.each(i,function(e,i){"xAxes"===i||"yAxes"===i?n.hasOwnProperty(i)?o.each(e,function(e,r){var s=o.getValueOrDefault(e.type,"xAxes"===i?"category":"linear"),a=t.scaleService.getScaleDefaults(s);r>=n[i].length||!n[i][r].type?n[i].push(o.configMerge(a,e)):e.type&&e.type!==n[i][r].type?n[i][r]=o.configMerge(n[i][r],a,e):n[i][r]=o.configMerge(n[i][r],e)}):(n[i]=[],o.each(e,function(e){var r=o.getValueOrDefault(e.type,"xAxes"===i?"category":"linear");n[i].push(o.configMerge(t.scaleService.getScaleDefaults(r),e))})):n.hasOwnProperty(i)&&"object"==typeof n[i]&&null!==n[i]&&"object"==typeof e?n[i]=o.configMerge(n[i],e):n[i]=e}),n},o.getValueAtIndexOrDefault=function(t,e,i){return void 0===t||null===t?i:o.isArray(t)?e<t.length?t[e]:i:t},o.getValueOrDefault=function(t,e){return void 0===t?e:t},o.indexOf=Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var i=0,n=t.length;i<n;++i)if(t[i]===e)return i;return-1},o.where=function(t,e){if(o.isArray(t)&&Array.prototype.filter)return t.filter(e);var i=[];return o.each(t,function(t){e(t)&&i.push(t)}),i},o.findIndex=Array.prototype.findIndex?function(t,e,i){return t.findIndex(e,i)}:function(t,e,i){i=void 0===i?t:i;for(var n=0,r=t.length;n<r;++n)if(e.call(i,t[n],n,t))return n;return-1},o.findNextWhere=function(t,e,i){void 0!==i&&null!==i||(i=-1);for(var n=i+1;n<t.length;n++){var r=t[n];if(e(r))return r}},o.findPreviousWhere=function(t,e,i){void 0!==i&&null!==i||(i=t.length);for(var n=i-1;n>=0;n--){var r=t[n];if(e(r))return r}},o.inherits=function(t){var e=this,i=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},n=function(){this.constructor=i};return n.prototype=e.prototype,i.prototype=new n,i.extend=o.inherits,t&&o.extend(i.prototype,t),i.__super__=e.prototype,i},o.noop=function(){},o.uid=function(){var t=0;return function(){return t++}}(),o.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},o.almostEquals=function(t,e,i){return Math.abs(t-e)<i},o.max=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.max(t,e)},Number.NEGATIVE_INFINITY)},o.min=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.min(t,e)},Number.POSITIVE_INFINITY)},o.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return t=+t,0===t||isNaN(t)?t:t>0?1:-1},o.log10=Math.log10?function(t){return Math.log10(t)}:function(t){return Math.log(t)/Math.LN10},o.toRadians=function(t){return t*(Math.PI/180)},o.toDegrees=function(t){return t*(180/Math.PI)},o.getAngleFromPoint=function(t,e){var i=e.x-t.x,n=e.y-t.y,r=Math.sqrt(i*i+n*n),o=Math.atan2(n,i);return o<-.5*Math.PI&&(o+=2*Math.PI),{angle:o,distance:r}},o.aliasPixel=function(t){return t%2===0?0:.5},o.splineCurve=function(t,e,i,n){var r=t.skip?e:t,o=e,s=i.skip?e:i,a=Math.sqrt(Math.pow(o.x-r.x,2)+Math.pow(o.y-r.y,2)),l=Math.sqrt(Math.pow(s.x-o.x,2)+Math.pow(s.y-o.y,2)),u=a/(a+l),c=l/(a+l);u=isNaN(u)?0:u,c=isNaN(c)?0:c;var h=n*u,d=n*c;return{previous:{x:o.x-h*(s.x-r.x),y:o.y-h*(s.y-r.y)},next:{x:o.x+d*(s.x-r.x),y:o.y+d*(s.y-r.y)}}},o.EPSILON=Number.EPSILON||1e-14,o.splineCurveMonotone=function(t){var e,i,n,r,s=(t||[]).map(function(t){return{model:t._model,deltaK:0,mK:0}}),a=s.length;for(e=0;e<a;++e)n=s[e],n.model.skip||(i=e>0?s[e-1]:null,r=e<a-1?s[e+1]:null,r&&!r.model.skip&&(n.deltaK=(r.model.y-n.model.y)/(r.model.x-n.model.x)),!i||i.model.skip?n.mK=n.deltaK:!r||r.model.skip?n.mK=i.deltaK:this.sign(i.deltaK)!=this.sign(n.deltaK)?n.mK=0:n.mK=(i.deltaK+n.deltaK)/2);var l,u,c,h;for(e=0;e<a-1;++e)n=s[e],r=s[e+1],n.model.skip||r.model.skip||(o.almostEquals(n.deltaK,0,this.EPSILON)?n.mK=r.mK=0:(l=n.mK/n.deltaK,u=r.mK/n.deltaK,h=Math.pow(l,2)+Math.pow(u,2),h<=9||(c=3/Math.sqrt(h),n.mK=l*c*n.deltaK,r.mK=u*c*n.deltaK)));var d;for(e=0;e<a;++e)n=s[e],n.model.skip||(i=e>0?s[e-1]:null,r=e<a-1?s[e+1]:null,i&&!i.model.skip&&(d=(n.model.x-i.model.x)/3,n.model.controlPointPreviousX=n.model.x-d,n.model.controlPointPreviousY=n.model.y-d*n.mK),r&&!r.model.skip&&(d=(r.model.x-n.model.x)/3,n.model.controlPointNextX=n.model.x+d,n.model.controlPointNextY=n.model.y+d*n.mK))},o.nextItem=function(t,e,i){return i?e>=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},o.previousItem=function(t,e,i){return i?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},o.niceNum=function(t,e){var i,n=Math.floor(o.log10(t)),r=t/Math.pow(10,n);return i=e?r<1.5?1:r<3?2:r<7?5:10:r<=1?1:r<=2?2:r<=5?5:10,i*Math.pow(10,n)};var s=o.easingEffects={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-1*t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return 1*((t=t/1-1)*t*t+1)},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-1*((t=t/1-1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return 1*(t/=1)*t*t*t*t},easeOutQuint:function(t){return 1*((t=t/1-1)*t*t*t*t+1)},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return-1*Math.cos(t/1*(Math.PI/2))+1},easeOutSine:function(t){return 1*Math.sin(t/1*(Math.PI/2))},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t/1)-1)},easeInExpo:function(t){return 0===t?1:1*Math.pow(2,10*(t/1-1))},easeOutExpo:function(t){return 1===t?1:1*(-Math.pow(2,-10*t/1)+1)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(-Math.pow(2,-10*--t)+2)},easeInCirc:function(t){return t>=1?t:-1*(Math.sqrt(1-(t/=1)*t)-1)},easeOutCirc:function(t){return 1*Math.sqrt(1-(t=t/1-1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:1===(t/=1)?1:(i||(i=.3),n<Math.abs(1)?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),-(n*Math.pow(2,10*(t-=1))*Math.sin((1*t-e)*(2*Math.PI)/i)))},easeOutElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:1===(t/=1)?1:(i||(i=.3),n<Math.abs(1)?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),n*Math.pow(2,-10*t)*Math.sin((1*t-e)*(2*Math.PI)/i)+1)},easeInOutElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:2===(t/=.5)?1:(i||(i=1*(.3*1.5)),n<Math.abs(1)?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),t<1?-.5*(n*Math.pow(2,10*(t-=1))*Math.sin((1*t-e)*(2*Math.PI)/i)):n*Math.pow(2,-10*(t-=1))*Math.sin((1*t-e)*(2*Math.PI)/i)*.5+1)},easeInBack:function(t){var e=1.70158;return 1*(t/=1)*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return 1*((t=t/1-1)*t*((e+1)*t+e)+1)},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:function(t){return 1-s.easeOutBounce(1-t)},easeOutBounce:function(t){return(t/=1)<1/2.75?1*(7.5625*t*t):t<2/2.75?1*(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1*(7.5625*(t-=2.25/2.75)*t+.9375):1*(7.5625*(t-=2.625/2.75)*t+.984375)},easeInOutBounce:function(t){return t<.5?.5*s.easeInBounce(2*t):.5*s.easeOutBounce(2*t-1)+.5}};o.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)}}(),o.cancelAnimFrame=function(){return window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||function(t){return window.clearTimeout(t,1e3/60)}}(),o.getRelativePosition=function(t,e){var i,n,r=t.originalEvent||t,s=t.currentTarget||t.srcElement,a=s.getBoundingClientRect(),l=r.touches;l&&l.length>0?(i=l[0].clientX,n=l[0].clientY):(i=r.clientX,n=r.clientY);var u=parseFloat(o.getStyle(s,"padding-left")),c=parseFloat(o.getStyle(s,"padding-top")),h=parseFloat(o.getStyle(s,"padding-right")),d=parseFloat(o.getStyle(s,"padding-bottom")),p=a.right-a.left-u-h,f=a.bottom-a.top-c-d;return i=Math.round((i-a.left-u)/p*s.width/e.currentDevicePixelRatio),n=Math.round((n-a.top-c)/f*s.height/e.currentDevicePixelRatio),{x:i,y:n}},o.addEvent=function(t,e,i){t.addEventListener?t.addEventListener(e,i):t.attachEvent?t.attachEvent("on"+e,i):t["on"+e]=i},o.removeEvent=function(t,e,i){t.removeEventListener?t.removeEventListener(e,i,!1):t.detachEvent?t.detachEvent("on"+e,i):t["on"+e]=o.noop},o.bindEvents=function(t,e,i){var n=t.events=t.events||{};o.each(e,function(e){n[e]=function(){i.apply(t,arguments)},o.addEvent(t.chart.canvas,e,n[e])})},o.unbindEvents=function(t,e){var i=t.chart.canvas;o.each(e,function(t,e){o.removeEvent(i,e,t)})},o.getConstraintWidth=function(t){return r(t,"max-width","clientWidth")},o.getConstraintHeight=function(t){return r(t,"max-height","clientHeight")},o.getMaximumWidth=function(t){var e=t.parentNode,i=parseInt(o.getStyle(e,"padding-left"))+parseInt(o.getStyle(e,"padding-right")),n=e.clientWidth-i,r=o.getConstraintWidth(t);return isNaN(r)?n:Math.min(n,r)},o.getMaximumHeight=function(t){var e=t.parentNode,i=parseInt(o.getStyle(e,"padding-top"))+parseInt(o.getStyle(e,"padding-bottom")),n=e.clientHeight-i,r=o.getConstraintHeight(t);return isNaN(r)?n:Math.min(n,r)},o.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},o.retinaScale=function(t){var e=t.ctx,i=t.canvas,n=i.width,r=i.height,o=t.currentDevicePixelRatio=window.devicePixelRatio||1;1!==o&&(i.height=r*o,i.width=n*o,e.scale(o,o),t.originalDevicePixelRatio=t.originalDevicePixelRatio||o),i.style.width=n+"px",i.style.height=r+"px"},o.clear=function(t){t.ctx.clearRect(0,0,t.width,t.height)},o.fontString=function(t,e,i){return e+" "+t+"px "+i},o.longestText=function(t,e,i,n){n=n||{};var r=n.data=n.data||{},s=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(r=n.data={},s=n.garbageCollect=[],n.font=e),t.font=e;var a=0;o.each(i,function(e){void 0!==e&&null!==e&&o.isArray(e)!==!0?a=o.measureText(t,r,s,a,e):o.isArray(e)&&o.each(e,function(e){void 0===e||null===e||o.isArray(e)||(a=o.measureText(t,r,s,a,e))})});var l=s.length/2;if(l>i.length){for(var u=0;u<l;u++)delete r[s[u]];s.splice(0,l)}return a},o.measureText=function(t,e,i,n,r){var o=e[r];return o||(o=e[r]=t.measureText(r).width,i.push(r)),o>n&&(n=o),n},o.numberOfLabelLines=function(t){var e=1;return o.each(t,function(t){o.isArray(t)&&t.length>e&&(e=t.length)}),e},o.drawRoundedRectangle=function(t,e,i,n,r,o){t.beginPath(),t.moveTo(e+o,i),t.lineTo(e+n-o,i),t.quadraticCurveTo(e+n,i,e+n,i+o),t.lineTo(e+n,i+r-o),t.quadraticCurveTo(e+n,i+r,e+n-o,i+r),t.lineTo(e+o,i+r),t.quadraticCurveTo(e,i+r,e,i+r-o),t.lineTo(e,i+o),t.quadraticCurveTo(e,i,e+o,i),t.closePath()},o.color=function(e){return i?i(e instanceof CanvasGradient?t.defaults.global.defaultColor:e):(console.log("Color.js not found!"),e)},o.addResizeListener=function(t,e){var i=document.createElement("iframe"),n="chartjs-hidden-iframe";i.classlist?i.classlist.add(n):i.setAttribute("class",n),i.tabIndex=-1;var r=i.style;r.width="100%",r.display="block",r.border=0,r.height=0,r.margin=0,r.position="absolute",r.left=0,r.right=0,r.top=0,r.bottom=0,
t.insertBefore(i,t.firstChild),(i.contentWindow||i).onresize=function(){e&&e()}},o.removeResizeListener=function(t){var e=t.querySelector(".chartjs-hidden-iframe");e&&e.parentNode.removeChild(e)},o.isArray=Array.isArray?function(t){return Array.isArray(t)}:function(t){return"[object Array]"===Object.prototype.toString.call(t)},o.arrayEquals=function(t,e){var i,n,r,s;if(!t||!e||t.length!=e.length)return!1;for(i=0,n=t.length;i<n;++i)if(r=t[i],s=e[i],r instanceof Array&&s instanceof Array){if(!o.arrayEquals(r,s))return!1}else if(r!=s)return!1;return!0},o.callCallback=function(t,e,i){t&&"function"==typeof t.call&&t.apply(i,e)},o.getHoverColor=function(t){return t instanceof CanvasPattern?t:o.color(t).saturate(.5).darken(.1).rgbString()}}},{2:2}],27:[function(t,e){"use strict";e.exports=function(){var t=function(e,i){var n=this,r=t.helpers;return n.config=i||{data:{datasets:[]}},e.length&&e[0].getContext&&(e=e[0]),e.getContext&&(e=e.getContext("2d")),n.ctx=e,n.canvas=e.canvas,e.canvas.style.display=e.canvas.style.display||"block",n.width=e.canvas.width||parseInt(r.getStyle(e.canvas,"width"),10)||r.getMaximumWidth(e.canvas),n.height=e.canvas.height||parseInt(r.getStyle(e.canvas,"height"),10)||r.getMaximumHeight(e.canvas),n.aspectRatio=n.width/n.height,(isNaN(n.aspectRatio)||isFinite(n.aspectRatio)===!1)&&(n.aspectRatio=void 0!==i.aspectRatio?i.aspectRatio:2),n.originalCanvasStyleWidth=e.canvas.style.width,n.originalCanvasStyleHeight=e.canvas.style.height,r.retinaScale(n),n.controller=new t.Controller(n),r.addResizeListener(e.canvas.parentNode,function(){n.controller&&n.controller.config.options.responsive&&n.controller.resize()}),n.controller?n.controller:n};return t.defaults={global:{responsive:!0,responsiveAnimationDuration:0,maintainAspectRatio:!0,events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"single",animationDuration:400},onClick:null,defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",showLines:!0,elements:{},legendCallback:function(t){var e=[];e.push('<ul class="'+t.id+'-legend">');for(var i=0;i<t.data.datasets.length;i++)e.push('<li><span style="background-color:'+t.data.datasets[i].backgroundColor+'"></span>'),t.data.datasets[i].label&&e.push(t.data.datasets[i].label),e.push("</li>");return e.push("</ul>"),e.join("")}}},t.Chart=t,t}},{}],28:[function(t,e){"use strict";e.exports=function(t){var e=t.helpers;t.layoutService={defaults:{},addBox:function(t,e){t.boxes||(t.boxes=[]),t.boxes.push(e)},removeBox:function(t,e){t.boxes&&t.boxes.splice(t.boxes.indexOf(e),1)},update:function(t,i,n){function r(t){var e,i=t.isHorizontal();i?(e=t.update(t.options.fullWidth?m:w,_),x-=e.height):(e=t.update(b,y),w-=e.width),k.push({horizontal:i,minSize:e,box:t})}function o(t){var i=e.findNextWhere(k,function(e){return e.box===t});if(i)if(t.isHorizontal()){var n={left:C,right:M,top:0,bottom:0};t.update(t.options.fullWidth?m:w,g/2,n)}else t.update(i.minSize.width,x)}function s(t){var i=e.findNextWhere(k,function(e){return e.box===t}),n={left:0,right:0,top:T,bottom:S};i&&t.update(i.minSize.width,x,n)}function a(t){t.isHorizontal()?(t.left=t.options.fullWidth?l:C,t.right=t.options.fullWidth?i-l:C+w,t.top=E,t.bottom=E+t.height,E=t.bottom):(t.left=A,t.right=A+t.width,t.top=T,t.bottom=T+x,A=t.right)}if(t){var l=0,u=0,c=e.where(t.boxes,function(t){return"left"===t.options.position}),h=e.where(t.boxes,function(t){return"right"===t.options.position}),d=e.where(t.boxes,function(t){return"top"===t.options.position}),p=e.where(t.boxes,function(t){return"bottom"===t.options.position}),f=e.where(t.boxes,function(t){return"chartArea"===t.options.position});d.sort(function(t,e){return(e.options.fullWidth?1:0)-(t.options.fullWidth?1:0)}),p.sort(function(t,e){return(t.options.fullWidth?1:0)-(e.options.fullWidth?1:0)});var m=i-2*l,g=n-2*u,v=m/2,y=g/2,b=(i-v)/(c.length+h.length),_=(n-y)/(d.length+p.length),w=m,x=g,k=[];e.each(c.concat(h,d,p),r);var C=l,M=l,T=u,S=u;e.each(c.concat(h),o),e.each(c,function(t){C+=t.width}),e.each(h,function(t){M+=t.width}),e.each(d.concat(p),o),e.each(d,function(t){T+=t.height}),e.each(p,function(t){S+=t.height}),e.each(c.concat(h),s),C=l,M=l,T=u,S=u,e.each(c,function(t){C+=t.width}),e.each(h,function(t){M+=t.width}),e.each(d,function(t){T+=t.height}),e.each(p,function(t){S+=t.height});var D=n-T-S,L=i-C-M;L===w&&D===x||(e.each(c,function(t){t.height=D}),e.each(h,function(t){t.height=D}),e.each(d,function(t){t.options.fullWidth||(t.width=L)}),e.each(p,function(t){t.options.fullWidth||(t.width=L)}),x=D,w=L);var A=l,E=u;e.each(c.concat(d),a),A+=w,E+=x,e.each(h,a),e.each(p,a),t.chartArea={left:C,top:T,right:C+w,bottom:T+x},e.each(f,function(e){e.left=t.chartArea.left,e.top=t.chartArea.top,e.right=t.chartArea.right,e.bottom=t.chartArea.bottom,e.update(w,x)})}}}}},{}],29:[function(t,e){"use strict";e.exports=function(t){var e=t.helpers,i=e.noop;t.defaults.global.legend={display:!0,position:"top",fullWidth:!0,reverse:!1,onClick:function(t,e){var i=e.datasetIndex,n=this.chart,r=n.getDatasetMeta(i);r.hidden=null===r.hidden?!n.data.datasets[i].hidden:null,n.update()},labels:{boxWidth:40,padding:10,generateLabels:function(t){var i=t.data;return e.isArray(i.datasets)?i.datasets.map(function(i,n){return{text:i.label,fillStyle:e.isArray(i.backgroundColor)?i.backgroundColor[0]:i.backgroundColor,hidden:!t.isDatasetVisible(n),lineCap:i.borderCapStyle,lineDash:i.borderDash,lineDashOffset:i.borderDashOffset,lineJoin:i.borderJoinStyle,lineWidth:i.borderWidth,strokeStyle:i.borderColor,pointStyle:i.pointStyle,datasetIndex:n}},this):[]}}},t.Legend=t.Element.extend({initialize:function(t){e.extend(this,t),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:i,update:function(t,e,i){var n=this;return n.beforeUpdate(),n.maxWidth=t,n.maxHeight=e,n.margins=i,n.beforeSetDimensions(),n.setDimensions(),n.afterSetDimensions(),n.beforeBuildLabels(),n.buildLabels(),n.afterBuildLabels(),n.beforeFit(),n.fit(),n.afterFit(),n.afterUpdate(),n.minSize},afterUpdate:i,beforeSetDimensions:i,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:i,beforeBuildLabels:i,buildLabels:function(){var t=this;t.legendItems=t.options.labels.generateLabels.call(t,t.chart),t.options.reverse&&t.legendItems.reverse()},afterBuildLabels:i,beforeFit:i,fit:function(){var i=this,n=i.options,r=n.labels,o=n.display,s=i.ctx,a=t.defaults.global,l=e.getValueOrDefault,u=l(r.fontSize,a.defaultFontSize),c=l(r.fontStyle,a.defaultFontStyle),h=l(r.fontFamily,a.defaultFontFamily),d=e.fontString(u,c,h),p=i.legendHitBoxes=[],f=i.minSize,m=i.isHorizontal();if(m?(f.width=i.maxWidth,f.height=o?10:0):(f.width=o?10:0,f.height=i.maxHeight),o)if(s.font=d,m){var g=i.lineWidths=[0],v=i.legendItems.length?u+r.padding:0;s.textAlign="left",s.textBaseline="top",e.each(i.legendItems,function(t,e){var n=r.usePointStyle?u*Math.sqrt(2):r.boxWidth,o=n+u/2+s.measureText(t.text).width;g[g.length-1]+o+r.padding>=i.width&&(v+=u+r.padding,g[g.length]=i.left),p[e]={left:0,top:0,width:o,height:u},g[g.length-1]+=o+r.padding}),f.height+=v}else{var y=r.padding,b=i.columnWidths=[],_=r.padding,w=0,x=0,k=u+y;e.each(i.legendItems,function(t,e){var i=r.usePointStyle?2*r.boxWidth:r.boxWidth,n=i+u/2+s.measureText(t.text).width;x+k>f.height&&(_+=w+r.padding,b.push(w),w=0,x=0),w=Math.max(w,n),x+=k,p[e]={left:0,top:0,width:n,height:u}}),_+=w,b.push(w),f.width+=_}i.width=f.width,i.height=f.height},afterFit:i,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var i=this,n=i.options,r=n.labels,o=t.defaults.global,s=o.elements.line,a=i.width,l=i.lineWidths;if(n.display){var u,c=i.ctx,h=e.getValueOrDefault,d=h(r.fontColor,o.defaultFontColor),p=h(r.fontSize,o.defaultFontSize),f=h(r.fontStyle,o.defaultFontStyle),m=h(r.fontFamily,o.defaultFontFamily),g=e.fontString(p,f,m);c.textAlign="left",c.textBaseline="top",c.lineWidth=.5,c.strokeStyle=d,c.fillStyle=d,c.font=g;var v=r.boxWidth,y=i.legendHitBoxes,b=function(e,i,r){if(!(isNaN(v)||v<=0)){if(c.save(),c.fillStyle=h(r.fillStyle,o.defaultColor),c.lineCap=h(r.lineCap,s.borderCapStyle),c.lineDashOffset=h(r.lineDashOffset,s.borderDashOffset),c.lineJoin=h(r.lineJoin,s.borderJoinStyle),c.lineWidth=h(r.lineWidth,s.borderWidth),c.strokeStyle=h(r.strokeStyle,o.defaultColor),c.setLineDash&&c.setLineDash(h(r.lineDash,s.borderDash)),n.labels&&n.labels.usePointStyle){var a=p*Math.SQRT2/2,l=a/Math.SQRT2,u=e+l,d=i+l;t.canvasHelpers.drawPoint(c,r.pointStyle,a,u,d)}else c.strokeRect(e,i,v,p),c.fillRect(e,i,v,p);c.restore()}},_=function(t,e,i,n){c.fillText(i.text,v+p/2+t,e),i.hidden&&(c.beginPath(),c.lineWidth=2,c.moveTo(v+p/2+t,e+p/2),c.lineTo(v+p/2+t+n,e+p/2),c.stroke())},w=i.isHorizontal();u=w?{x:i.left+(a-l[0])/2,y:i.top+r.padding,line:0}:{x:i.left+r.padding,y:i.top+r.padding,line:0};var x=p+r.padding;e.each(i.legendItems,function(t,e){var n=c.measureText(t.text).width,o=r.usePointStyle?p+p/2+n:v+p/2+n,s=u.x,h=u.y;w?s+o>=a&&(h=u.y+=x,u.line++,s=u.x=i.left+(a-l[u.line])/2):h+x>i.bottom&&(s=u.x=s+i.columnWidths[u.line]+r.padding,h=u.y=i.top,u.line++),b(s,h,t),y[e].left=s,y[e].top=h,_(s,h,t,n),w?u.x+=o+r.padding:u.y+=x})}},handleEvent:function(t){var i=this,n=e.getRelativePosition(t,i.chart.chart),r=n.x,o=n.y,s=i.options;if(r>=i.left&&r<=i.right&&o>=i.top&&o<=i.bottom)for(var a=i.legendHitBoxes,l=0;l<a.length;++l){var u=a[l];if(r>=u.left&&r<=u.left+u.width&&o>=u.top&&o<=u.top+u.height){s.onClick&&s.onClick.call(i,t,i.legendItems[l]);break}}}}),t.plugins.register({beforeInit:function(e){var i=e.options,n=i.legend;n&&(e.legend=new t.Legend({ctx:e.chart.ctx,options:n,chart:e}),t.layoutService.addBox(e,e.legend))}})}},{}],30:[function(t,e){"use strict";e.exports=function(t){var e=t.helpers.noop;t.plugins={_plugins:[],register:function(t){var e=this._plugins;[].concat(t).forEach(function(t){e.indexOf(t)===-1&&e.push(t)})},unregister:function(t){var e=this._plugins;[].concat(t).forEach(function(t){var i=e.indexOf(t);i!==-1&&e.splice(i,1)})},clear:function(){this._plugins=[]},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(t,e){var i,n,r=this._plugins,o=r.length;for(i=0;i<o;++i)if(n=r[i],"function"==typeof n[t]&&n[t].apply(n,e||[])===!1)return!1;return!0}},t.PluginBase=t.Element.extend({beforeInit:e,afterInit:e,beforeUpdate:e,afterUpdate:e,beforeDraw:e,afterDraw:e,destroy:e}),t.pluginService=t.plugins}},{}],31:[function(t,e){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.scale={display:!0,position:"left",gridLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",offsetGridLines:!1,borderDash:[],borderDashOffset:0},scaleLabel:{labelString:"",display:!1},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:10,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:function(t){return e.isArray(t)?t:""+t}}},t.Scale=t.Element.extend({beforeUpdate:function(){e.callCallback(this.options.beforeUpdate,[this])},update:function(t,i,n){var r=this;return r.beforeUpdate(),r.maxWidth=t,r.maxHeight=i,r.margins=e.extend({left:0,right:0,top:0,bottom:0},n),r.beforeSetDimensions(),r.setDimensions(),r.afterSetDimensions(),r.beforeDataLimits(),r.determineDataLimits(),r.afterDataLimits(),r.beforeBuildTicks(),r.buildTicks(),r.afterBuildTicks(),r.beforeTickToLabelConversion(),r.convertTicksToLabels(),r.afterTickToLabelConversion(),r.beforeCalculateTickRotation(),r.calculateTickRotation(),r.afterCalculateTickRotation(),r.beforeFit(),r.fit(),r.afterFit(),r.afterUpdate(),r.minSize},afterUpdate:function(){e.callCallback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){e.callCallback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0},afterSetDimensions:function(){e.callCallback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){e.callCallback(this.options.beforeDataLimits,[this])},determineDataLimits:e.noop,afterDataLimits:function(){e.callCallback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){e.callCallback(this.options.beforeBuildTicks,[this])},buildTicks:e.noop,afterBuildTicks:function(){e.callCallback(this.options.afterBuildTicks,[this])},beforeTickToLabelConversion:function(){e.callCallback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var t=this;t.ticks=t.ticks.map(function(e,i,n){return t.options.ticks.userCallback?t.options.ticks.userCallback(e,i,n):t.options.ticks.callback(e,i,n)},t)},afterTickToLabelConversion:function(){e.callCallback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){e.callCallback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var i=this,n=i.ctx,r=t.defaults.global,o=i.options.ticks,s=e.getValueOrDefault(o.fontSize,r.defaultFontSize),a=e.getValueOrDefault(o.fontStyle,r.defaultFontStyle),l=e.getValueOrDefault(o.fontFamily,r.defaultFontFamily),u=e.fontString(s,a,l);n.font=u;var c,h=n.measureText(i.ticks[0]).width,d=n.measureText(i.ticks[i.ticks.length-1]).width;if(i.labelRotation=o.minRotation||0,i.paddingRight=0,i.paddingLeft=0,i.options.display&&i.isHorizontal()){i.paddingRight=d/2+3,i.paddingLeft=h/2+3,i.longestTextCache||(i.longestTextCache={});for(var p,f,m=e.longestText(n,u,i.ticks,i.longestTextCache),g=m,v=i.getPixelForTick(1)-i.getPixelForTick(0)-6;g>v&&i.labelRotation<o.maxRotation;){if(p=Math.cos(e.toRadians(i.labelRotation)),f=Math.sin(e.toRadians(i.labelRotation)),c=p*h,c+s/2>i.yLabelWidth&&(i.paddingLeft=c+s/2),i.paddingRight=s/2,f*m>i.maxHeight){i.labelRotation--;break}i.labelRotation++,g=p*m}}i.margins&&(i.paddingLeft=Math.max(i.paddingLeft-i.margins.left,0),i.paddingRight=Math.max(i.paddingRight-i.margins.right,0))},afterCalculateTickRotation:function(){e.callCallback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){e.callCallback(this.options.beforeFit,[this])},fit:function(){var i=this,n=i.minSize={width:0,height:0},r=i.options,o=t.defaults.global,s=r.ticks,a=r.scaleLabel,l=r.gridLines,u=r.display,c=i.isHorizontal(),h=e.getValueOrDefault(s.fontSize,o.defaultFontSize),d=e.getValueOrDefault(s.fontStyle,o.defaultFontStyle),p=e.getValueOrDefault(s.fontFamily,o.defaultFontFamily),f=e.fontString(h,d,p),m=e.getValueOrDefault(a.fontSize,o.defaultFontSize),g=r.gridLines.tickMarkLength;if(c?n.width=i.isFullWidth()?i.maxWidth-i.margins.left-i.margins.right:i.maxWidth:n.width=u&&l.drawTicks?g:0,c?n.height=u&&l.drawTicks?g:0:n.height=i.maxHeight,a.display&&u&&(c?n.height+=1.5*m:n.width+=1.5*m),s.display&&u){i.longestTextCache||(i.longestTextCache={});var v=e.longestText(i.ctx,f,i.ticks,i.longestTextCache),y=e.numberOfLabelLines(i.ticks),b=.5*h;if(c){i.longestLabelWidth=v;var _=Math.sin(e.toRadians(i.labelRotation))*i.longestLabelWidth+h*y+b*y;n.height=Math.min(i.maxHeight,n.height+_),i.ctx.font=f;var w=i.ctx.measureText(i.ticks[0]).width,x=i.ctx.measureText(i.ticks[i.ticks.length-1]).width,k=Math.cos(e.toRadians(i.labelRotation)),C=Math.sin(e.toRadians(i.labelRotation));i.paddingLeft=0!==i.labelRotation?k*w+3:w/2+3,i.paddingRight=0!==i.labelRotation?C*(h/2)+3:x/2+3}else{var M=i.maxWidth-n.width,T=s.mirror;T?v=0:v+=i.options.ticks.padding,v<M?n.width+=v:n.width=i.maxWidth,i.paddingTop=h/2,i.paddingBottom=h/2}}i.margins&&(i.paddingLeft=Math.max(i.paddingLeft-i.margins.left,0),i.paddingTop=Math.max(i.paddingTop-i.margins.top,0),i.paddingRight=Math.max(i.paddingRight-i.margins.right,0),i.paddingBottom=Math.max(i.paddingBottom-i.margins.bottom,0)),i.width=n.width,i.height=n.height},afterFit:function(){e.callCallback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){return null===t||"undefined"==typeof t?NaN:"number"==typeof t&&isNaN(t)?NaN:"object"==typeof t?t instanceof Date||t.isValid?t:this.getRightValue(this.isHorizontal()?t.x:t.y):t},getLabelForIndex:e.noop,getPixelForValue:e.noop,getValueForPixel:e.noop,getPixelForTick:function(t,e){var i=this;if(i.isHorizontal()){var n=i.width-(i.paddingLeft+i.paddingRight),r=n/Math.max(i.ticks.length-(i.options.gridLines.offsetGridLines?0:1),1),o=r*t+i.paddingLeft;e&&(o+=r/2);var s=i.left+Math.round(o);return s+=i.isFullWidth()?i.margins.left:0}var a=i.height-(i.paddingTop+i.paddingBottom);return i.top+t*(a/(i.ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var i=e.width-(e.paddingLeft+e.paddingRight),n=i*t+e.paddingLeft,r=e.left+Math.round(n);return r+=e.isFullWidth()?e.margins.left:0}return e.top+t*e.height},getBasePixel:function(){var t=this,e=t.min,i=t.max;return t.getPixelForValue(t.beginAtZero?0:e<0&&i<0?i:e>0&&i>0?e:0)},draw:function(i){var n=this,r=n.options;if(r.display){var o,s,a=n.ctx,l=t.defaults.global,u=r.ticks,c=r.gridLines,h=r.scaleLabel,d=0!==n.labelRotation,p=u.autoSkip,f=n.isHorizontal();u.maxTicksLimit&&(s=u.maxTicksLimit);var m=e.getValueOrDefault(u.fontColor,l.defaultFontColor),g=e.getValueOrDefault(u.fontSize,l.defaultFontSize),v=e.getValueOrDefault(u.fontStyle,l.defaultFontStyle),y=e.getValueOrDefault(u.fontFamily,l.defaultFontFamily),b=e.fontString(g,v,y),_=c.tickMarkLength,w=e.getValueOrDefault(c.borderDash,l.borderDash),x=e.getValueOrDefault(c.borderDashOffset,l.borderDashOffset),k=e.getValueOrDefault(h.fontColor,l.defaultFontColor),C=e.getValueOrDefault(h.fontSize,l.defaultFontSize),M=e.getValueOrDefault(h.fontStyle,l.defaultFontStyle),T=e.getValueOrDefault(h.fontFamily,l.defaultFontFamily),S=e.fontString(C,M,T),D=e.toRadians(n.labelRotation),L=Math.cos(D),A=n.longestLabelWidth*L;a.fillStyle=m;var E=[];if(f){if(o=!1,d&&(A/=2),(A+u.autoSkipPadding)*n.ticks.length>n.width-(n.paddingLeft+n.paddingRight)&&(o=1+Math.floor((A+u.autoSkipPadding)*n.ticks.length/(n.width-(n.paddingLeft+n.paddingRight)))),s&&n.ticks.length>s)for(;!o||n.ticks.length/(o||1)>s;)o||(o=1),o+=1;p||(o=!1)}var I="right"===r.position?n.left:n.right-_,P="right"===r.position?n.left+_:n.right,O="bottom"===r.position?n.top:n.bottom-_,j="bottom"===r.position?n.top+_:n.bottom;if(e.each(n.ticks,function(t,s){if(void 0!==t&&null!==t){var a=n.ticks.length===s+1,l=o>1&&s%o>0||s%o===0&&s+o>=n.ticks.length;if((!l||a)&&void 0!==t&&null!==t){var h,p;s===("undefined"!=typeof n.zeroLineIndex?n.zeroLineIndex:0)?(h=c.zeroLineWidth,p=c.zeroLineColor):(h=e.getValueAtIndexOrDefault(c.lineWidth,s),p=e.getValueAtIndexOrDefault(c.color,s));var m,g,v,y,b,k,C,M,T,S,L,A="middle";if(f){d||(A="top"===r.position?"bottom":"top"),L=d?"right":"center";var N=n.getPixelForTick(s)+e.aliasPixel(h);T=n.getPixelForTick(s,c.offsetGridLines)+u.labelOffset,S=d?n.top+12:"top"===r.position?n.bottom-_:n.top+_,m=v=b=C=N,g=O,y=j,k=i.top,M=i.bottom}else{"left"===r.position?u.mirror?(T=n.right+u.padding,L="left"):(T=n.right-u.padding,L="right"):u.mirror?(T=n.left-u.padding,L="right"):(T=n.left+u.padding,L="left");var Y=n.getPixelForTick(s);Y+=e.aliasPixel(h),S=n.getPixelForTick(s,c.offsetGridLines),m=I,v=P,b=i.left,C=i.right,g=y=k=M=Y}E.push({tx1:m,ty1:g,tx2:v,ty2:y,x1:b,y1:k,x2:C,y2:M,labelX:T,labelY:S,glWidth:h,glColor:p,glBorderDash:w,glBorderDashOffset:x,rotation:-1*D,label:t,textBaseline:A,textAlign:L})}}}),e.each(E,function(t){if(c.display&&(a.save(),a.lineWidth=t.glWidth,a.strokeStyle=t.glColor,a.setLineDash&&(a.setLineDash(t.glBorderDash),a.lineDashOffset=t.glBorderDashOffset),a.beginPath(),c.drawTicks&&(a.moveTo(t.tx1,t.ty1),a.lineTo(t.tx2,t.ty2)),c.drawOnChartArea&&(a.moveTo(t.x1,t.y1),a.lineTo(t.x2,t.y2)),a.stroke(),a.restore()),u.display){a.save(),a.translate(t.labelX,t.labelY),a.rotate(t.rotation),a.font=b,a.textBaseline=t.textBaseline,a.textAlign=t.textAlign;var i=t.label;if(e.isArray(i))for(var n=0,r=0;n<i.length;++n)a.fillText(""+i[n],0,r),r+=1.5*g;else a.fillText(i,0,0);a.restore()}}),h.display){var N,Y,H=0;if(f)N=n.left+(n.right-n.left)/2,Y="bottom"===r.position?n.bottom-C/2:n.top+C/2;else{var F="left"===r.position;N=F?n.left+C/2:n.right-C/2,Y=n.top+(n.bottom-n.top)/2,H=F?-.5*Math.PI:.5*Math.PI}a.save(),a.translate(N,Y),a.rotate(H),a.textAlign="center",a.textBaseline="middle",a.fillStyle=k,a.font=S,a.fillText(h.labelString,0,0),a.restore()}if(c.drawBorder){a.lineWidth=e.getValueAtIndexOrDefault(c.lineWidth,0),a.strokeStyle=e.getValueAtIndexOrDefault(c.color,0);var R=n.left,W=n.right,z=n.top,B=n.bottom,$=e.aliasPixel(a.lineWidth);f?(z=B="top"===r.position?n.bottom:n.top,z+=$,B+=$):(R=W="left"===r.position?n.right:n.left,R+=$,W+=$),a.beginPath(),a.moveTo(R,z),a.lineTo(W,B),a.stroke()}}}})}},{}],32:[function(t,e){"use strict";e.exports=function(t){var e=t.helpers;t.scaleService={constructors:{},defaults:{},registerScaleType:function(t,i,n){this.constructors[t]=i,this.defaults[t]=e.clone(n)},getScaleConstructor:function(t){return this.constructors.hasOwnProperty(t)?this.constructors[t]:void 0},getScaleDefaults:function(i){return this.defaults.hasOwnProperty(i)?e.scaleMerge(t.defaults.scale,this.defaults[i]):{}},updateScaleDefaults:function(t,i){var n=this.defaults;n.hasOwnProperty(t)&&(n[t]=e.extend(n[t],i))},addScalesToLayout:function(i){e.each(i.scales,function(e){t.layoutService.addBox(i,e)})}}}},{}],33:[function(t,e){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.global.title={display:!1,position:"top",fullWidth:!0,fontStyle:"bold",padding:10,text:""};var i=e.noop;t.Title=t.Element.extend({initialize:function(i){var n=this;e.extend(n,i),n.options=e.configMerge(t.defaults.global.title,i.options),n.legendHitBoxes=[]},beforeUpdate:function(){var i=this.chart.options;i&&i.title&&(this.options=e.configMerge(t.defaults.global.title,i.title))},update:function(t,e,i){var n=this;return n.beforeUpdate(),n.maxWidth=t,n.maxHeight=e,n.margins=i,n.beforeSetDimensions(),n.setDimensions(),n.afterSetDimensions(),n.beforeBuildLabels(),n.buildLabels(),n.afterBuildLabels(),n.beforeFit(),n.fit(),n.afterFit(),n.afterUpdate(),n.minSize},afterUpdate:i,beforeSetDimensions:i,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:i,beforeBuildLabels:i,buildLabels:i,afterBuildLabels:i,beforeFit:i,fit:function(){var i=this,n=e.getValueOrDefault,r=i.options,o=t.defaults.global,s=r.display,a=n(r.fontSize,o.defaultFontSize),l=i.minSize;i.isHorizontal()?(l.width=i.maxWidth,l.height=s?a+2*r.padding:0):(l.width=s?a+2*r.padding:0,l.height=i.maxHeight),i.width=l.width,i.height=l.height},afterFit:i,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var i=this,n=i.ctx,r=e.getValueOrDefault,o=i.options,s=t.defaults.global;if(o.display){var a,l,u=r(o.fontSize,s.defaultFontSize),c=r(o.fontStyle,s.defaultFontStyle),h=r(o.fontFamily,s.defaultFontFamily),d=e.fontString(u,c,h),p=0,f=i.top,m=i.left,g=i.bottom,v=i.right;n.fillStyle=r(o.fontColor,s.defaultFontColor),n.font=d,i.isHorizontal()?(a=m+(v-m)/2,l=f+(g-f)/2):(a="left"===o.position?m+u/2:v-u/2,l=f+(g-f)/2,p=Math.PI*("left"===o.position?-.5:.5)),n.save(),n.translate(a,l),n.rotate(p),n.textAlign="center",n.textBaseline="middle",n.fillText(o.text,0,0),n.restore()}}}),t.plugins.register({beforeInit:function(e){var i=e.options,n=i.title;n&&(e.titleBlock=new t.Title({ctx:e.chart.ctx,options:n,chart:e}),t.layoutService.addBox(e,e.titleBlock))}})}},{}],34:[function(t,e){"use strict";e.exports=function(t){function e(t,e){return e&&(r.isArray(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function i(t){if(!t.length)return!1;var e,i,n=[],r=[];for(e=0,i=t.length;e<i;++e){var o=t[e];if(o&&o.hasValue()){var s=o.tooltipPosition();n.push(s.x),r.push(s.y)}}var a=0,l=0;for(e=0;e<n.length;++e)n[e]&&(a+=n[e],l+=r[e]);return{x:Math.round(a/n.length),y:Math.round(l/n.length)}}function n(t){var e=t._xScale,i=t._yScale||t._scale,n=t._index,r=t._datasetIndex;return{xLabel:e?e.getLabelForIndex(n,r):"",yLabel:i?i.getLabelForIndex(n,r):"",index:n,datasetIndex:r}}var r=t.helpers;t.defaults.global.tooltips={enabled:!0,custom:null,mode:"single",backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,yAlign:"center",xAlign:"center",caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",callbacks:{beforeTitle:r.noop,title:function(t,e){var i="",n=e.labels,r=n?n.length:0;if(t.length>0){var o=t[0];o.xLabel?i=o.xLabel:r>0&&o.index<r&&(i=n[o.index])}return i},afterTitle:r.noop,beforeBody:r.noop,beforeLabel:r.noop,label:function(t,e){var i=e.datasets[t.datasetIndex].label||"";return i+": "+t.yLabel},labelColor:function(t,e){var i=e.getDatasetMeta(t.datasetIndex),n=i.data[t.index],r=n._view;return{borderColor:r.borderColor,backgroundColor:r.backgroundColor}},afterLabel:r.noop,afterBody:r.noop,beforeFooter:r.noop,footer:r.noop,afterFooter:r.noop}},t.Tooltip=t.Element.extend({initialize:function(){var e=this,i=t.defaults.global,n=e._options,o=r.getValueOrDefault;r.extend(e,{_model:{xPadding:n.xPadding,yPadding:n.yPadding,xAlign:n.xAlign,yAlign:n.yAlign,bodyFontColor:n.bodyFontColor,_bodyFontFamily:o(n.bodyFontFamily,i.defaultFontFamily),_bodyFontStyle:o(n.bodyFontStyle,i.defaultFontStyle),_bodyAlign:n.bodyAlign,bodyFontSize:o(n.bodyFontSize,i.defaultFontSize),bodySpacing:n.bodySpacing,titleFontColor:n.titleFontColor,_titleFontFamily:o(n.titleFontFamily,i.defaultFontFamily),_titleFontStyle:o(n.titleFontStyle,i.defaultFontStyle),titleFontSize:o(n.titleFontSize,i.defaultFontSize),_titleAlign:n.titleAlign,titleSpacing:n.titleSpacing,titleMarginBottom:n.titleMarginBottom,footerFontColor:n.footerFontColor,_footerFontFamily:o(n.footerFontFamily,i.defaultFontFamily),_footerFontStyle:o(n.footerFontStyle,i.defaultFontStyle),footerFontSize:o(n.footerFontSize,i.defaultFontSize),_footerAlign:n.footerAlign,footerSpacing:n.footerSpacing,footerMarginTop:n.footerMarginTop,caretSize:n.caretSize,cornerRadius:n.cornerRadius,backgroundColor:n.backgroundColor,opacity:0,legendColorBackground:n.multiKeyBackground}})},getTitle:function(){var t=this,i=t._options,n=i.callbacks,r=n.beforeTitle.apply(t,arguments),o=n.title.apply(t,arguments),s=n.afterTitle.apply(t,arguments),a=[];return a=e(a,r),a=e(a,o),a=e(a,s)},getBeforeBody:function(){var t=this._options.callbacks.beforeBody.apply(this,arguments);return r.isArray(t)?t:void 0!==t?[t]:[]},getBody:function(t,i){var n=this,o=n._options.callbacks,s=[];return r.each(t,function(t){var r={before:[],lines:[],after:[]};e(r.before,o.beforeLabel.call(n,t,i)),e(r.lines,o.label.call(n,t,i)),e(r.after,o.afterLabel.call(n,t,i)),s.push(r)}),s},getAfterBody:function(){var t=this._options.callbacks.afterBody.apply(this,arguments);return r.isArray(t)?t:void 0!==t?[t]:[]},getFooter:function(){var t=this,i=t._options.callbacks,n=i.beforeFooter.apply(t,arguments),r=i.footer.apply(t,arguments),o=i.afterFooter.apply(t,arguments),s=[];return s=e(s,n),s=e(s,r),s=e(s,o)},update:function(t){var e,o,s=this,a=s._options,l=s._model,u=s._active,c=s._data,h=s._chartInstance;if(u.length){l.opacity=1;var d=[],p=i(u),f=[];for(e=0,o=u.length;e<o;++e)f.push(n(u[e]));a.itemSort&&(f=f.sort(function(t,e){return a.itemSort(t,e,c)})),u.length>1&&r.each(f,function(t){d.push(a.callbacks.labelColor.call(s,t,h))}),r.extend(l,{title:s.getTitle(f,c),beforeBody:s.getBeforeBody(f,c),body:s.getBody(f,c),afterBody:s.getAfterBody(f,c),footer:s.getFooter(f,c),x:Math.round(p.x),y:Math.round(p.y),caretPadding:r.getValueOrDefault(p.padding,2),labelColors:d});var m=s.getTooltipSize(l);s.determineAlignment(m),r.extend(l,s.getBackgroundPoint(l,m))}else s._model.opacity=0;return t&&a.custom&&a.custom.call(s,l),s},getTooltipSize:function(t){var e=this._chart.ctx,i={height:2*t.yPadding,width:0},n=t.body,o=n.reduce(function(t,e){return t+e.before.length+e.lines.length+e.after.length},0);o+=t.beforeBody.length+t.afterBody.length;var s=t.title.length,a=t.footer.length,l=t.titleFontSize,u=t.bodyFontSize,c=t.footerFontSize;i.height+=s*l,i.height+=(s-1)*t.titleSpacing,i.height+=s?t.titleMarginBottom:0,i.height+=o*u,i.height+=o?(o-1)*t.bodySpacing:0,i.height+=a?t.footerMarginTop:0,i.height+=a*c,i.height+=a?(a-1)*t.footerSpacing:0;var h=0,d=function(t){i.width=Math.max(i.width,e.measureText(t).width+h)};return e.font=r.fontString(l,t._titleFontStyle,t._titleFontFamily),r.each(t.title,d),e.font=r.fontString(u,t._bodyFontStyle,t._bodyFontFamily),r.each(t.beforeBody.concat(t.afterBody),d),h=n.length>1?u+2:0,r.each(n,function(t){r.each(t.before,d),r.each(t.lines,d),r.each(t.after,d)}),h=0,e.font=r.fontString(c,t._footerFontStyle,t._footerFontFamily),r.each(t.footer,d),i.width+=2*t.xPadding,i},determineAlignment:function(t){var e=this,i=e._model,n=e._chart,r=e._chartInstance.chartArea;i.y<t.height?i.yAlign="top":i.y>n.height-t.height&&(i.yAlign="bottom");var o,s,a,l,u,c=(r.left+r.right)/2,h=(r.top+r.bottom)/2;"center"===i.yAlign?(o=function(t){return t<=c},s=function(t){return t>c}):(o=function(e){return e<=t.width/2},s=function(e){return e>=n.width-t.width/2}),a=function(e){return e+t.width>n.width},l=function(e){return e-t.width<0},u=function(t){return t<=h?"top":"bottom"},o(i.x)?(i.xAlign="left",a(i.x)&&(i.xAlign="center",i.yAlign=u(i.y))):s(i.x)&&(i.xAlign="right",l(i.x)&&(i.xAlign="center",i.yAlign=u(i.y)))},getBackgroundPoint:function(t,e){var i={x:t.x,y:t.y},n=t.caretSize,r=t.caretPadding,o=t.cornerRadius,s=t.xAlign,a=t.yAlign,l=n+r,u=o+r;return"right"===s?i.x-=e.width:"center"===s&&(i.x-=e.width/2),"top"===a?i.y+=l:"bottom"===a?i.y-=e.height+l:i.y-=e.height/2,"center"===a?"left"===s?i.x+=l:"right"===s&&(i.x-=l):"left"===s?i.x-=u:"right"===s&&(i.x+=u),i},drawCaret:function(t,e,i){var n,o,s,a,l,u,c=this._view,h=this._chart.ctx,d=c.caretSize,p=c.cornerRadius,f=c.xAlign,m=c.yAlign,g=t.x,v=t.y,y=e.width,b=e.height;"center"===m?("left"===f?(n=g,o=n-d,s=n):(n=g+y,o=n+d,s=n),l=v+b/2,a=l-d,u=l+d):("left"===f?(n=g+p,o=n+d,s=o+d):"right"===f?(n=g+y-p,o=n-d,s=o-d):(o=g+y/2,n=o-d,s=o+d),"top"===m?(a=v,l=a-d,u=a):(a=v+b,l=a+d,u=a));var _=r.color(c.backgroundColor);h.fillStyle=_.alpha(i*_.alpha()).rgbString(),h.beginPath(),h.moveTo(n,a),h.lineTo(o,l),h.lineTo(s,u),h.closePath(),h.fill()},drawTitle:function(t,e,i,n){var o=e.title;if(o.length){i.textAlign=e._titleAlign,i.textBaseline="top";var s=e.titleFontSize,a=e.titleSpacing,l=r.color(e.titleFontColor);i.fillStyle=l.alpha(n*l.alpha()).rgbString(),i.font=r.fontString(s,e._titleFontStyle,e._titleFontFamily);var u,c;for(u=0,c=o.length;u<c;++u)i.fillText(o[u],t.x,t.y),t.y+=s+a,u+1===o.length&&(t.y+=e.titleMarginBottom-a)}},drawBody:function(t,e,i,n){var o=e.bodyFontSize,s=e.bodySpacing,a=e.body;i.textAlign=e._bodyAlign,i.textBaseline="top";var l=r.color(e.bodyFontColor),u=l.alpha(n*l.alpha()).rgbString();i.fillStyle=u,i.font=r.fontString(o,e._bodyFontStyle,e._bodyFontFamily);var c=0,h=function(e){i.fillText(e,t.x+c,t.y),t.y+=o+s};r.each(e.beforeBody,h);var d=a.length>1;c=d?o+2:0,r.each(a,function(s,a){r.each(s.before,h),r.each(s.lines,function(s){d&&(i.fillStyle=r.color(e.legendColorBackground).alpha(n).rgbaString(),i.fillRect(t.x,t.y,o,o),i.strokeStyle=r.color(e.labelColors[a].borderColor).alpha(n).rgbaString(),i.strokeRect(t.x,t.y,o,o),i.fillStyle=r.color(e.labelColors[a].backgroundColor).alpha(n).rgbaString(),i.fillRect(t.x+1,t.y+1,o-2,o-2),i.fillStyle=u),h(s)}),r.each(s.after,h)}),c=0,r.each(e.afterBody,h),t.y-=s},drawFooter:function(t,e,i,n){var o=e.footer;if(o.length){t.y+=e.footerMarginTop,i.textAlign=e._footerAlign,i.textBaseline="top";var s=r.color(e.footerFontColor);i.fillStyle=s.alpha(n*s.alpha()).rgbString(),i.font=r.fontString(e.footerFontSize,e._footerFontStyle,e._footerFontFamily),r.each(o,function(n){i.fillText(n,t.x,t.y),t.y+=e.footerFontSize+e.footerSpacing})}},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var i=this.getTooltipSize(e),n={x:e.x,y:e.y},o=Math.abs(e.opacity<.001)?0:e.opacity;if(this._options.enabled){var s=r.color(e.backgroundColor);t.fillStyle=s.alpha(o*s.alpha()).rgbString(),r.drawRoundedRectangle(t,n.x,n.y,i.width,i.height,e.cornerRadius),
t.fill(),this.drawCaret(n,i,o),n.x+=e.xPadding,n.y+=e.yPadding,this.drawTitle(n,e,t,o),this.drawBody(n,e,t,o),this.drawFooter(n,e,t,o)}}}})}},{}],35:[function(t,e){"use strict";e.exports=function(t){var e=t.helpers,i=t.defaults.global;i.elements.arc={backgroundColor:i.defaultColor,borderColor:"#fff",borderWidth:2},t.elements.Arc=t.Element.extend({inLabelRange:function(t){var e=this._view;return!!e&&Math.pow(t-e.x,2)<Math.pow(e.radius+e.hoverRadius,2)},inRange:function(t,i){var n=this._view;if(n){for(var r=e.getAngleFromPoint(n,{x:t,y:i}),o=r.angle,s=r.distance,a=n.startAngle,l=n.endAngle;l<a;)l+=2*Math.PI;for(;o>l;)o-=2*Math.PI;for(;o<a;)o+=2*Math.PI;var u=o>=a&&o<=l,c=s>=n.innerRadius&&s<=n.outerRadius;return u&&c}return!1},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,i=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*i,y:t.y+Math.sin(e)*i}},draw:function(){var t=this._chart.ctx,e=this._view,i=e.startAngle,n=e.endAngle;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,i,n),t.arc(e.x,e.y,e.innerRadius,n,i,!0),t.closePath(),t.strokeStyle=e.borderColor,t.lineWidth=e.borderWidth,t.fillStyle=e.backgroundColor,t.fill(),t.lineJoin="bevel",e.borderWidth&&t.stroke()}})}},{}],36:[function(t,e){"use strict";e.exports=function(t){var e=t.helpers,i=t.defaults.global;t.defaults.global.elements.line={tension:.4,backgroundColor:i.defaultColor,borderWidth:3,borderColor:i.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0},t.elements.Line=t.Element.extend({draw:function(){function t(t,e){var i=e._view;e._view.steppedLine===!0?(l.lineTo(e._view.x,t._view.y),l.lineTo(e._view.x,e._view.y)):0===e._view.tension?l.lineTo(i.x,i.y):l.bezierCurveTo(t._view.controlPointNextX,t._view.controlPointNextY,i.controlPointPreviousX,i.controlPointPreviousY,i.x,i.y)}var n=this,r=n._view,o=r.spanGaps,s=r.scaleZero,a=n._loop,l=n._chart.ctx;l.save();var u=n._children.slice(),c=-1;a&&u.length&&u.push(u[0]);var h,d,p,f;if(u.length&&r.fill){for(l.beginPath(),h=0;h<u.length;++h)d=u[h],p=e.previousItem(u,h),f=d._view,0===h?(a?l.moveTo(s.x,s.y):l.moveTo(f.x,s),f.skip||(c=h,l.lineTo(f.x,f.y))):(p=c===-1?p:u[c],f.skip?o||c!==h-1||(a?l.lineTo(s.x,s.y):l.lineTo(p._view.x,s)):(c!==h-1?o&&c!==-1?t(p,d):a?l.lineTo(f.x,f.y):(l.lineTo(f.x,s),l.lineTo(f.x,f.y)):t(p,d),c=h));a||c===-1||l.lineTo(u[c]._view.x,s),l.fillStyle=r.backgroundColor||i.defaultColor,l.closePath(),l.fill()}var m=i.elements.line;for(l.lineCap=r.borderCapStyle||m.borderCapStyle,l.setLineDash&&l.setLineDash(r.borderDash||m.borderDash),l.lineDashOffset=r.borderDashOffset||m.borderDashOffset,l.lineJoin=r.borderJoinStyle||m.borderJoinStyle,l.lineWidth=r.borderWidth||m.borderWidth,l.strokeStyle=r.borderColor||i.defaultColor,l.beginPath(),c=-1,h=0;h<u.length;++h)d=u[h],p=e.previousItem(u,h),f=d._view,0===h?f.skip||(l.moveTo(f.x,f.y),c=h):(p=c===-1?p:u[c],f.skip||(c!==h-1&&!o||c===-1?l.moveTo(f.x,f.y):t(p,d),c=h));l.stroke(),l.restore()}})}},{}],37:[function(t,e){"use strict";e.exports=function(t){var e=t.helpers,i=t.defaults.global,n=i.defaultColor;i.elements.point={radius:3,pointStyle:"circle",backgroundColor:n,borderWidth:1,borderColor:n,hitRadius:1,hoverRadius:4,hoverBorderWidth:1},t.elements.Point=t.Element.extend({inRange:function(t,e){var i=this._view;return!!i&&Math.pow(t-i.x,2)+Math.pow(e-i.y,2)<Math.pow(i.hitRadius+i.radius,2)},inLabelRange:function(t){var e=this._view;return!!e&&Math.pow(t-e.x,2)<Math.pow(e.radius+e.hitRadius,2)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y,padding:t.radius+t.borderWidth}},draw:function(){var r=this._view,o=this._chart.ctx,s=r.pointStyle,a=r.radius,l=r.x,u=r.y;r.skip||(o.strokeStyle=r.borderColor||n,o.lineWidth=e.getValueOrDefault(r.borderWidth,i.elements.point.borderWidth),o.fillStyle=r.backgroundColor||n,t.canvasHelpers.drawPoint(o,s,a,l,u))}})}},{}],38:[function(t,e){"use strict";e.exports=function(t){var e=t.defaults.global;e.elements.rectangle={backgroundColor:e.defaultColor,borderWidth:0,borderColor:e.defaultColor,borderSkipped:"bottom"},t.elements.Rectangle=t.Element.extend({draw:function(){function t(t){return l[(c+t)%4]}var e=this._chart.ctx,i=this._view,n=i.width/2,r=i.x-n,o=i.x+n,s=i.base-(i.base-i.y),a=i.borderWidth/2;i.borderWidth&&(r+=a,o-=a,s+=a),e.beginPath(),e.fillStyle=i.backgroundColor,e.strokeStyle=i.borderColor,e.lineWidth=i.borderWidth;var l=[[r,i.base],[r,s],[o,s],[o,i.base]],u=["bottom","left","top","right"],c=u.indexOf(i.borderSkipped,0);c===-1&&(c=0),e.moveTo.apply(e,t(0));for(var h=1;h<4;h++)e.lineTo.apply(e,t(h));e.fill(),i.borderWidth&&e.stroke()},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){var i=this._view;return!!i&&(i.y<i.base?t>=i.x-i.width/2&&t<=i.x+i.width/2&&e>=i.y&&e<=i.base:t>=i.x-i.width/2&&t<=i.x+i.width/2&&e>=i.base&&e<=i.y)},inLabelRange:function(t){var e=this._view;return!!e&&(t>=e.x-e.width/2&&t<=e.x+e.width/2)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}})}},{}],39:[function(t,e){"use strict";e.exports=function(t){var e=t.helpers,i={position:"bottom"},n=t.Scale.extend({getLabels:function(){var t=this.chart.data;return(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels},determineDataLimits:function(){var t=this,i=t.getLabels();t.minIndex=0,t.maxIndex=i.length-1;var n;void 0!==t.options.ticks.min&&(n=e.indexOf(i,t.options.ticks.min),t.minIndex=n!==-1?n:t.minIndex),void 0!==t.options.ticks.max&&(n=e.indexOf(i,t.options.ticks.max),t.maxIndex=n!==-1?n:t.maxIndex),t.min=i[t.minIndex],t.max=i[t.maxIndex]},buildTicks:function(){var t=this,e=t.getLabels();t.ticks=0===t.minIndex&&t.maxIndex===e.length-1?e:e.slice(t.minIndex,t.maxIndex+1)},getLabelForIndex:function(t){return this.ticks[t]},getPixelForValue:function(t,e,i,n){var r=this,o=Math.max(r.maxIndex+1-r.minIndex-(r.options.gridLines.offsetGridLines?0:1),1);if(void 0!==t&&isNaN(e)){var s=r.getLabels(),a=s.indexOf(t);e=a!==-1?a:e}if(r.isHorizontal()){var l=r.width-(r.paddingLeft+r.paddingRight),u=l/o,c=u*(e-r.minIndex)+r.paddingLeft;return(r.options.gridLines.offsetGridLines&&n||r.maxIndex===r.minIndex&&n)&&(c+=u/2),r.left+Math.round(c)}var h=r.height-(r.paddingTop+r.paddingBottom),d=h/o,p=d*(e-r.minIndex)+r.paddingTop;return r.options.gridLines.offsetGridLines&&n&&(p+=d/2),r.top+Math.round(p)},getPixelForTick:function(t,e){return this.getPixelForValue(this.ticks[t],t+this.minIndex,null,e)},getValueForPixel:function(t){var e,i=this,n=Math.max(i.ticks.length-(i.options.gridLines.offsetGridLines?0:1),1),r=i.isHorizontal(),o=r?i.width-(i.paddingLeft+i.paddingRight):i.height-(i.paddingTop+i.paddingBottom),s=o/n;return t-=r?i.left:i.top,i.options.gridLines.offsetGridLines&&(t-=s/2),t-=r?i.paddingLeft:i.paddingTop,e=t<=0?0:Math.round(t/s)},getBasePixel:function(){return this.bottom}});t.scaleService.registerScaleType("category",n,i)}},{}],40:[function(t,e){"use strict";e.exports=function(t){var e=t.helpers,i={position:"left",ticks:{callback:function(t,i,n){var r=n.length>3?n[2]-n[1]:n[1]-n[0];Math.abs(r)>1&&t!==Math.floor(t)&&(r=t-Math.floor(t));var o=e.log10(Math.abs(r)),s="";if(0!==t){var a=-1*Math.floor(o);a=Math.max(Math.min(a,20),0),s=t.toFixed(a)}else s="0";return s}}},n=t.LinearScaleBase.extend({determineDataLimits:function(){function t(t){return a?t.xAxisID===i.id:t.yAxisID===i.id}var i=this,n=i.options,r=i.chart,o=r.data,s=o.datasets,a=i.isHorizontal();if(i.min=null,i.max=null,n.stacked){var l={},u=!1,c=!1;e.each(s,function(o,s){var a=r.getDatasetMeta(s);void 0===l[a.type]&&(l[a.type]={positiveValues:[],negativeValues:[]});var h=l[a.type].positiveValues,d=l[a.type].negativeValues;r.isDatasetVisible(s)&&t(a)&&e.each(o.data,function(t,e){var r=+i.getRightValue(t);isNaN(r)||a.data[e].hidden||(h[e]=h[e]||0,d[e]=d[e]||0,n.relativePoints?h[e]=100:r<0?(c=!0,d[e]+=r):(u=!0,h[e]+=r))})}),e.each(l,function(t){var n=t.positiveValues.concat(t.negativeValues),r=e.min(n),o=e.max(n);i.min=null===i.min?r:Math.min(i.min,r),i.max=null===i.max?o:Math.max(i.max,o)})}else e.each(s,function(n,o){var s=r.getDatasetMeta(o);r.isDatasetVisible(o)&&t(s)&&e.each(n.data,function(t,e){var n=+i.getRightValue(t);isNaN(n)||s.data[e].hidden||(null===i.min?i.min=n:n<i.min&&(i.min=n),null===i.max?i.max=n:n>i.max&&(i.max=n))})});this.handleTickRangeOptions()},getTickLimit:function(){var i,n=this,r=n.options.ticks;if(n.isHorizontal())i=Math.min(r.maxTicksLimit?r.maxTicksLimit:11,Math.ceil(n.width/50));else{var o=e.getValueOrDefault(r.fontSize,t.defaults.global.defaultFontSize);i=Math.min(r.maxTicksLimit?r.maxTicksLimit:11,Math.ceil(n.height/(2*o)))}return i},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){var e,i,n=this,r=n.paddingLeft,o=n.paddingBottom,s=n.start,a=+n.getRightValue(t),l=n.end-s;return n.isHorizontal()?(i=n.width-(r+n.paddingRight),e=n.left+i/l*(a-s),Math.round(e+r)):(i=n.height-(n.paddingTop+o),e=n.bottom-o-i/l*(a-s),Math.round(e))},getValueForPixel:function(t){var e=this,i=e.isHorizontal(),n=e.paddingLeft,r=e.paddingBottom,o=i?e.width-(n+e.paddingRight):e.height-(e.paddingTop+r),s=(i?t-e.left-n:e.bottom-r-t)/o;return e.start+(e.end-e.start)*s},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}});t.scaleService.registerScaleType("linear",n,i)}},{}],41:[function(t,e){"use strict";e.exports=function(t){var e=t.helpers,i=e.noop;t.LinearScaleBase=t.Scale.extend({handleTickRangeOptions:function(){var t=this,i=t.options,n=i.ticks;if(n.beginAtZero){var r=e.sign(t.min),o=e.sign(t.max);r<0&&o<0?t.max=0:r>0&&o>0&&(t.min=0)}void 0!==n.min?t.min=n.min:void 0!==n.suggestedMin&&(t.min=Math.min(t.min,n.suggestedMin)),void 0!==n.max?t.max=n.max:void 0!==n.suggestedMax&&(t.max=Math.max(t.max,n.suggestedMax)),t.min===t.max&&(t.max++,n.beginAtZero||t.min--)},getTickLimit:i,handleDirectionalChanges:i,buildTicks:function(){var t=this,i=t.options,n=t.ticks=[],r=i.ticks,o=e.getValueOrDefault,s=t.getTickLimit();s=Math.max(2,s);var a,l=r.fixedStepSize&&r.fixedStepSize>0||r.stepSize&&r.stepSize>0;if(l)a=o(r.fixedStepSize,r.stepSize);else{var u=e.niceNum(t.max-t.min,!1);a=e.niceNum(u/(s-1),!0)}var c=Math.floor(t.min/a)*a,h=Math.ceil(t.max/a)*a,d=(h-c)/a;d=e.almostEquals(d,Math.round(d),a/1e3)?Math.round(d):Math.ceil(d),n.push(void 0!==r.min?r.min:c);for(var p=1;p<d;++p)n.push(c+p*a);n.push(void 0!==r.max?r.max:h),t.handleDirectionalChanges(),t.max=e.max(n),t.min=e.min(n),r.reverse?(n.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max)},convertTicksToLabels:function(){var e=this;e.ticksAsNumbers=e.ticks.slice(),e.zeroLineIndex=e.ticks.indexOf(0),t.Scale.prototype.convertTicksToLabels.call(e)}})}},{}],42:[function(t,e){"use strict";e.exports=function(t){var e=t.helpers,i={position:"left",ticks:{callback:function(t,i,n){var r=t/Math.pow(10,Math.floor(e.log10(t)));return 0===t?"0":1===r||2===r||5===r||0===i||i===n.length-1?t.toExponential():""}}},n=t.Scale.extend({determineDataLimits:function(){function t(t){return u?t.xAxisID===i.id:t.yAxisID===i.id}var i=this,n=i.options,r=n.ticks,o=i.chart,s=o.data,a=s.datasets,l=e.getValueOrDefault,u=i.isHorizontal();if(i.min=null,i.max=null,i.minNotZero=null,n.stacked){var c={};e.each(a,function(r,s){var a=o.getDatasetMeta(s);o.isDatasetVisible(s)&&t(a)&&(void 0===c[a.type]&&(c[a.type]=[]),e.each(r.data,function(t,e){var r=c[a.type],o=+i.getRightValue(t);isNaN(o)||a.data[e].hidden||(r[e]=r[e]||0,n.relativePoints?r[e]=100:r[e]+=o)}))}),e.each(c,function(t){var n=e.min(t),r=e.max(t);i.min=null===i.min?n:Math.min(i.min,n),i.max=null===i.max?r:Math.max(i.max,r)})}else e.each(a,function(n,r){var s=o.getDatasetMeta(r);o.isDatasetVisible(r)&&t(s)&&e.each(n.data,function(t,e){var n=+i.getRightValue(t);isNaN(n)||s.data[e].hidden||(null===i.min?i.min=n:n<i.min&&(i.min=n),null===i.max?i.max=n:n>i.max&&(i.max=n),0!==n&&(null===i.minNotZero||n<i.minNotZero)&&(i.minNotZero=n))})});i.min=l(r.min,i.min),i.max=l(r.max,i.max),i.min===i.max&&(0!==i.min&&null!==i.min?(i.min=Math.pow(10,Math.floor(e.log10(i.min))-1),i.max=Math.pow(10,Math.floor(e.log10(i.max))+1)):(i.min=1,i.max=10))},buildTicks:function(){for(var t=this,i=t.options,n=i.ticks,r=e.getValueOrDefault,o=t.ticks=[],s=r(n.min,Math.pow(10,Math.floor(e.log10(t.min))));s<t.max;){o.push(s);var a,l;0===s?(a=Math.floor(e.log10(t.minNotZero)),l=Math.round(t.minNotZero/Math.pow(10,a))):(a=Math.floor(e.log10(s)),l=Math.floor(s/Math.pow(10,a))+1),10===l&&(l=1,++a),s=l*Math.pow(10,a)}var u=r(n.max,s);o.push(u),t.isHorizontal()||o.reverse(),t.max=e.max(o),t.min=e.min(o),n.reverse?(o.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max)},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),t.Scale.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForTick:function(t){return this.getPixelForValue(this.tickValues[t])},getPixelForValue:function(t){var i,n,r,o=this,s=o.start,a=+o.getRightValue(t),l=o.paddingTop,u=o.paddingBottom,c=o.paddingLeft,h=o.options,d=h.ticks;return o.isHorizontal()?(r=e.log10(o.end)-e.log10(s),0===a?n=o.left+c:(i=o.width-(c+o.paddingRight),n=o.left+i/r*(e.log10(a)-e.log10(s)),n+=c)):(i=o.height-(l+u),0!==s||d.reverse?0===o.end&&d.reverse?(r=e.log10(o.start)-e.log10(o.minNotZero),n=a===o.end?o.top+l:a===o.minNotZero?o.top+l+.02*i:o.top+l+.02*i+.98*i/r*(e.log10(a)-e.log10(o.minNotZero))):(r=e.log10(o.end)-e.log10(s),i=o.height-(l+u),n=o.bottom-u-i/r*(e.log10(a)-e.log10(s))):(r=e.log10(o.end)-e.log10(o.minNotZero),n=a===s?o.bottom-u:a===o.minNotZero?o.bottom-u-.02*i:o.bottom-u-.02*i-.98*i/r*(e.log10(a)-e.log10(o.minNotZero)))),n},getValueForPixel:function(t){var i,n,r=this,o=e.log10(r.end)-e.log10(r.start);return r.isHorizontal()?(n=r.width-(r.paddingLeft+r.paddingRight),i=r.start*Math.pow(10,(t-r.left-r.paddingLeft)*o/n)):(n=r.height-(r.paddingTop+r.paddingBottom),i=Math.pow(10,(r.bottom-r.paddingBottom-t)*o/n)/r.start),i}});t.scaleService.registerScaleType("logarithmic",n,i)}},{}],43:[function(t,e){"use strict";e.exports=function(t){var e=t.helpers,i=t.defaults.global,n={display:!0,animate:!0,lineArc:!1,position:"chartArea",angleLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2},pointLabels:{fontSize:10,callback:function(t){return t}}},r=t.LinearScaleBase.extend({getValueCount:function(){return this.chart.data.labels.length},setDimensions:function(){var t=this,n=t.options,r=n.ticks;t.width=t.maxWidth,t.height=t.maxHeight,t.xCenter=Math.round(t.width/2),t.yCenter=Math.round(t.height/2);var o=e.min([t.height,t.width]),s=e.getValueOrDefault(r.fontSize,i.defaultFontSize);t.drawingArea=n.display?o/2-(s/2+r.backdropPaddingY):o/2},determineDataLimits:function(){var t=this,i=t.chart;t.min=null,t.max=null,e.each(i.data.datasets,function(n,r){if(i.isDatasetVisible(r)){var o=i.getDatasetMeta(r);e.each(n.data,function(e,i){var n=+t.getRightValue(e);isNaN(n)||o.data[i].hidden||(null===t.min?t.min=n:n<t.min&&(t.min=n),null===t.max?t.max=n:n>t.max&&(t.max=n))})}}),t.handleTickRangeOptions()},getTickLimit:function(){var t=this.options.ticks,n=e.getValueOrDefault(t.fontSize,i.defaultFontSize);return Math.min(t.maxTicksLimit?t.maxTicksLimit:11,Math.ceil(this.drawingArea/(1.5*n)))},convertTicksToLabels:function(){var e=this;t.LinearScaleBase.prototype.convertTicksToLabels.call(e),e.pointLabels=e.chart.data.labels.map(e.options.pointLabels.callback,e)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var t,n,r,o,s,a,l,u,c,h,d,p,f=this.options.pointLabels,m=e.getValueOrDefault(f.fontSize,i.defaultFontSize),g=e.getValueOrDefault(f.fontStyle,i.defaultFontStyle),v=e.getValueOrDefault(f.fontFamily,i.defaultFontFamily),y=e.fontString(m,g,v),b=e.min([this.height/2-m-5,this.width/2]),_=this.width,w=0;for(this.ctx.font=y,n=0;n<this.getValueCount();n++){t=this.getPointPosition(n,b),r=this.ctx.measureText(this.pointLabels[n]?this.pointLabels[n]:"").width+5;var x=this.getIndexAngle(n)+Math.PI/2,k=360*x/(2*Math.PI)%360;0===k||180===k?(o=r/2,t.x+o>_&&(_=t.x+o,s=n),t.x-o<w&&(w=t.x-o,l=n)):k<180?t.x+r>_&&(_=t.x+r,s=n):t.x-r<w&&(w=t.x-r,l=n)}c=w,h=Math.ceil(_-this.width),a=this.getIndexAngle(s),u=this.getIndexAngle(l),d=h/Math.sin(a+Math.PI/2),p=c/Math.sin(u+Math.PI/2),d=e.isNumber(d)?d:0,p=e.isNumber(p)?p:0,this.drawingArea=Math.round(b-(p+d)/2),this.setCenterPoint(p,d)},setCenterPoint:function(t,e){var i=this,n=i.width-e-i.drawingArea,r=t+i.drawingArea;i.xCenter=Math.round((r+n)/2+i.left),i.yCenter=Math.round(i.height/2+i.top)},getIndexAngle:function(t){var e=2*Math.PI/this.getValueCount(),i=this.chart.options&&this.chart.options.startAngle?this.chart.options.startAngle:0,n=i*Math.PI*2/360;return t*e-Math.PI/2+n},getDistanceFromCenterForValue:function(t){var e=this;if(null===t)return 0;var i=e.drawingArea/(e.max-e.min);return e.options.reverse?(e.max-t)*i:(t-e.min)*i},getPointPosition:function(t,e){var i=this,n=i.getIndexAngle(t);return{x:Math.round(Math.cos(n)*e)+i.xCenter,y:Math.round(Math.sin(n)*e)+i.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(){var t=this,e=t.min,i=t.max;return t.getPointPositionForValue(0,t.beginAtZero?0:e<0&&i<0?i:e>0&&i>0?e:0)},draw:function(){var t=this,n=t.options,r=n.gridLines,o=n.ticks,s=n.angleLines,a=n.pointLabels,l=e.getValueOrDefault;if(n.display){var u=t.ctx,c=l(o.fontSize,i.defaultFontSize),h=l(o.fontStyle,i.defaultFontStyle),d=l(o.fontFamily,i.defaultFontFamily),p=e.fontString(c,h,d);if(e.each(t.ticks,function(s,a){if(a>0||n.reverse){var h=t.getDistanceFromCenterForValue(t.ticksAsNumbers[a]),d=t.yCenter-h;if(r.display&&0!==a)if(u.strokeStyle=e.getValueAtIndexOrDefault(r.color,a-1),u.lineWidth=e.getValueAtIndexOrDefault(r.lineWidth,a-1),n.lineArc)u.beginPath(),u.arc(t.xCenter,t.yCenter,h,0,2*Math.PI),u.closePath(),u.stroke();else{u.beginPath();for(var f=0;f<t.getValueCount();f++){var m=t.getPointPosition(f,h);0===f?u.moveTo(m.x,m.y):u.lineTo(m.x,m.y)}u.closePath(),u.stroke()}if(o.display){var g=l(o.fontColor,i.defaultFontColor);if(u.font=p,o.showLabelBackdrop){var v=u.measureText(s).width;u.fillStyle=o.backdropColor,u.fillRect(t.xCenter-v/2-o.backdropPaddingX,d-c/2-o.backdropPaddingY,v+2*o.backdropPaddingX,c+2*o.backdropPaddingY)}u.textAlign="center",u.textBaseline="middle",u.fillStyle=g,u.fillText(s,t.xCenter,d)}}}),!n.lineArc){u.lineWidth=s.lineWidth,u.strokeStyle=s.color;for(var f=t.getDistanceFromCenterForValue(n.reverse?t.min:t.max),m=l(a.fontSize,i.defaultFontSize),g=l(a.fontStyle,i.defaultFontStyle),v=l(a.fontFamily,i.defaultFontFamily),y=e.fontString(m,g,v),b=t.getValueCount()-1;b>=0;b--){if(s.display){var _=t.getPointPosition(b,f);u.beginPath(),u.moveTo(t.xCenter,t.yCenter),u.lineTo(_.x,_.y),u.stroke(),u.closePath()}var w=t.getPointPosition(b,f+5),x=l(a.fontColor,i.defaultFontColor);u.font=y,u.fillStyle=x;var k=t.pointLabels,C=this.getIndexAngle(b)+Math.PI/2,M=360*C/(2*Math.PI)%360;0===M||180===M?u.textAlign="center":M<180?u.textAlign="left":u.textAlign="right",90===M||270===M?u.textBaseline="middle":M>270||M<90?u.textBaseline="bottom":u.textBaseline="top",u.fillText(k[b]?k[b]:"",w.x,w.y)}}}}});t.scaleService.registerScaleType("radialLinear",r,n)}},{}],44:[function(t,e){"use strict";var i=t(6);i="function"==typeof i?i:window.moment,e.exports=function(t){var e=t.helpers,n={units:[{name:"millisecond",steps:[1,2,5,10,20,50,100,250,500]},{name:"second",steps:[1,2,5,10,30]},{name:"minute",steps:[1,2,5,10,30]},{name:"hour",steps:[1,2,3,6,12]},{name:"day",steps:[1,2,5]},{name:"week",maxStep:4},{name:"month",maxStep:3},{name:"quarter",maxStep:4},{name:"year",maxStep:!1}]},r={position:"bottom",time:{parser:!1,format:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,displayFormats:{millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm:ss a",hour:"MMM D, hA",day:"ll",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"}},ticks:{autoSkip:!1}},o=t.Scale.extend({initialize:function(){if(!i)throw new Error("Chart.js - Moment.js could not be found! You must include it before Chart.js to use the time scale. Download at https://momentjs.com");t.Scale.prototype.initialize.call(this)},getLabelMoment:function(t,e){return"undefined"!=typeof this.labelMoments[t]?this.labelMoments[t][e]:null},getMomentStartOf:function(t){var e=this;return"week"===e.options.time.unit&&e.options.time.isoWeekday!==!1?t.clone().startOf("isoWeek").isoWeekday(e.options.time.isoWeekday):t.clone().startOf(e.tickUnit)},determineDataLimits:function(){var t=this;t.labelMoments=[];var n=[];t.chart.data.labels&&t.chart.data.labels.length>0?(e.each(t.chart.data.labels,function(e){var i=t.parseTime(e);i.isValid()&&(t.options.time.round&&i.startOf(t.options.time.round),n.push(i))},t),t.firstTick=i.min.call(t,n),t.lastTick=i.max.call(t,n)):(t.firstTick=null,t.lastTick=null),e.each(t.chart.data.datasets,function(r,o){var s=[],a=t.chart.isDatasetVisible(o);"object"==typeof r.data[0]&&null!==r.data[0]?e.each(r.data,function(e){var n=t.parseTime(t.getRightValue(e));n.isValid()&&(t.options.time.round&&n.startOf(t.options.time.round),s.push(n),a&&(t.firstTick=null!==t.firstTick?i.min(t.firstTick,n):n,t.lastTick=null!==t.lastTick?i.max(t.lastTick,n):n))},t):s=n,t.labelMoments.push(s)},t),t.options.time.min&&(t.firstTick=t.parseTime(t.options.time.min)),t.options.time.max&&(t.lastTick=t.parseTime(t.options.time.max)),t.firstTick=(t.firstTick||i()).clone(),t.lastTick=(t.lastTick||i()).clone()},buildTicks:function(){var i=this;i.ctx.save();var r=e.getValueOrDefault(i.options.ticks.fontSize,t.defaults.global.defaultFontSize),o=e.getValueOrDefault(i.options.ticks.fontStyle,t.defaults.global.defaultFontStyle),s=e.getValueOrDefault(i.options.ticks.fontFamily,t.defaults.global.defaultFontFamily),a=e.fontString(r,o,s);if(i.ctx.font=a,i.ticks=[],i.unitScale=1,i.scaleSizeInUnits=0,i.options.time.unit)i.tickUnit=i.options.time.unit||"day",i.displayFormat=i.options.time.displayFormats[i.tickUnit],i.scaleSizeInUnits=i.lastTick.diff(i.firstTick,i.tickUnit,!0),i.unitScale=e.getValueOrDefault(i.options.time.unitStepSize,1);else{var l=i.isHorizontal()?i.width-(i.paddingLeft+i.paddingRight):i.height-(i.paddingTop+i.paddingBottom),u=i.tickFormatFunction(i.firstTick,0,[]),c=i.ctx.measureText(u).width,h=Math.cos(e.toRadians(i.options.ticks.maxRotation)),d=Math.sin(e.toRadians(i.options.ticks.maxRotation));c=c*h+r*d;var p=l/c;i.tickUnit="millisecond",i.scaleSizeInUnits=i.lastTick.diff(i.firstTick,i.tickUnit,!0),i.displayFormat=i.options.time.displayFormats[i.tickUnit];for(var f=0,m=n.units[f];f<n.units.length;){if(i.unitScale=1,e.isArray(m.steps)&&Math.ceil(i.scaleSizeInUnits/p)<e.max(m.steps)){for(var g=0;g<m.steps.length;++g)if(m.steps[g]>=Math.ceil(i.scaleSizeInUnits/p)){i.unitScale=e.getValueOrDefault(i.options.time.unitStepSize,m.steps[g]);break}break}if(m.maxStep===!1||Math.ceil(i.scaleSizeInUnits/p)<m.maxStep){i.unitScale=e.getValueOrDefault(i.options.time.unitStepSize,Math.ceil(i.scaleSizeInUnits/p));break}++f,m=n.units[f],i.tickUnit=m.name;var v=i.firstTick.diff(i.getMomentStartOf(i.firstTick),i.tickUnit,!0),y=i.getMomentStartOf(i.lastTick.clone().add(1,i.tickUnit)).diff(i.lastTick,i.tickUnit,!0);i.scaleSizeInUnits=i.lastTick.diff(i.firstTick,i.tickUnit,!0)+v+y,i.displayFormat=i.options.time.displayFormats[m.name]}}var b;if(i.options.time.min?b=i.getMomentStartOf(i.firstTick):(i.firstTick=i.getMomentStartOf(i.firstTick),b=i.firstTick),!i.options.time.max){var _=i.getMomentStartOf(i.lastTick),w=_.diff(i.lastTick,i.tickUnit,!0);w<0?i.lastTick=i.getMomentStartOf(i.lastTick.add(1,i.tickUnit)):w>=0&&(i.lastTick=_),i.scaleSizeInUnits=i.lastTick.diff(i.firstTick,i.tickUnit,!0)}i.options.time.displayFormat&&(i.displayFormat=i.options.time.displayFormat),i.ticks.push(i.firstTick.clone());for(var x=1;x<=i.scaleSizeInUnits;++x){var k=b.clone().add(x,i.tickUnit);if(i.options.time.max&&k.diff(i.lastTick,i.tickUnit,!0)>=0)break;x%i.unitScale===0&&i.ticks.push(k)}var C=i.ticks[i.ticks.length-1].diff(i.lastTick,i.tickUnit);0===C&&0!==i.scaleSizeInUnits||(i.options.time.max?(i.ticks.push(i.lastTick.clone()),i.scaleSizeInUnits=i.lastTick.diff(i.ticks[0],i.tickUnit,!0)):0===i.scaleSizeInUnits&&(i.ticks.push(i.lastTick.clone()),i.scaleSizeInUnits=i.lastTick.diff(i.firstTick,i.tickUnit,!0))),i.ctx.restore()},getLabelForIndex:function(t,e){var i=this,n=i.chart.data.labels&&t<i.chart.data.labels.length?i.chart.data.labels[t]:"";return"object"==typeof i.chart.data.datasets[e].data[0]&&(n=i.getRightValue(i.chart.data.datasets[e].data[t])),i.options.time.tooltipFormat&&(n=i.parseTime(n).format(i.options.time.tooltipFormat)),n},tickFormatFunction:function(t,i,n){var r=t.format(this.displayFormat),o=this.options.ticks,s=e.getValueOrDefault(o.callback,o.userCallback);return s?s(r,i,n):r},convertTicksToLabels:function(){var t=this;t.tickMoments=t.ticks,t.ticks=t.ticks.map(t.tickFormatFunction,t)},getPixelForValue:function(t,e,i){var n=this;t&&t.isValid||(t=n.parseTime(n.getRightValue(t)));var r=t&&t.isValid&&t.isValid()?t:n.getLabelMoment(i,e);if(r){var o=r.diff(n.firstTick,n.tickUnit,!0),s=0!==o?o/n.scaleSizeInUnits:o;if(n.isHorizontal()){var a=n.width-(n.paddingLeft+n.paddingRight),l=a*s+n.paddingLeft;return n.left+Math.round(l)}var u=n.height-(n.paddingTop+n.paddingBottom),c=u*s+n.paddingTop;return n.top+Math.round(c)}},getPixelForTick:function(t){return this.getPixelForValue(this.tickMoments[t],null,null)},getValueForPixel:function(t){var e=this,n=e.isHorizontal()?e.width-(e.paddingLeft+e.paddingRight):e.height-(e.paddingTop+e.paddingBottom),r=(t-(e.isHorizontal()?e.left+e.paddingLeft:e.top+e.paddingTop))/n;return r*=e.scaleSizeInUnits,e.firstTick.clone().add(i.duration(r,e.tickUnit).asSeconds(),"seconds")},parseTime:function(t){var e=this;return"string"==typeof e.options.time.parser?i(t,e.options.time.parser):"function"==typeof e.options.time.parser?e.options.time.parser(t):"function"==typeof t.getMonth||"number"==typeof t?i(t):t.isValid&&t.isValid()?t:"string"!=typeof e.options.time.format&&e.options.time.format.call?(console.warn("options.time.format is deprecated and replaced by options.time.parser. See http://nnnick.github.io/Chart.js/docs-v2/#scales-time-scale"),e.options.time.format(t)):i(t,e.options.time.format)}});t.scaleService.registerScaleType("time",o,r)}},{6:6}]},{},[7])(7)}),function(t,e){"object"==typeof module&&module.exports?module.exports=t.document?e(t):e:t.Highcharts=e(t)}("undefined"!=typeof window?window:this,function(t){function e(e,i){var n="Highcharts error #"+e+": www.highcharts.com/errors/"+e;if(i)throw Error(n);t.console&&console.log(n)}function i(t,e,i){this.options=e,this.elem=t,this.prop=i}function n(){var t,e,i=arguments,n={},r=function(t,e){var i,n;"object"!=typeof t&&(t={});for(n in e)e.hasOwnProperty(n)&&(i=e[n],t[n]=i&&"object"==typeof i&&"[object Array]"!==Object.prototype.toString.call(i)&&"renderTo"!==n&&"number"!=typeof i.nodeType?r(t[n]||{},i):e[n]);return t};for(i[0]===!0&&(n=i[1],i=Array.prototype.slice.call(i,2)),e=i.length,t=0;t<e;t++)n=r(n,i[t]);return n}function r(t,e){return parseInt(t,e||10)}function o(t){return"string"==typeof t}function s(t){return t&&"object"==typeof t}function a(t){return"[object Array]"===Object.prototype.toString.call(t)}function l(t,e){for(var i=t.length;i--;)if(t[i]===e){t.splice(i,1);break}}function u(t){return t!==O&&null!==t}function c(t,e,i){var n,r;if(o(e))u(i)?t.setAttribute(e,i):t&&t.getAttribute&&(r=t.getAttribute(e));else if(u(e)&&s(e))for(n in e)t.setAttribute(n,e[n]);return r}function h(t){return a(t)?t:[t]}function d(t,e,i){return e?setTimeout(t,e,i):void t.call(0,i)}function p(t,e){bt&&!Mt&&e&&e.opacity!==O&&(e.filter="alpha(opacity="+100*e.opacity+")"),Xt(t.style,e)}function f(t,e,i,n,r){return t=ot.createElement(t),e&&Xt(t,e),r&&p(t,{padding:0,border:"none",margin:0}),i&&p(t,i),n&&n.appendChild(t),t}function m(t,e){var i=function(){};return i.prototype=new t,Xt(i.prototype,e),i}function g(t,e,i){return Array((e||2)+1-String(t).length).join(i||0)+t}function v(t){return 6e4*($&&$(t)||B||0)}function y(t,e){for(var i,n,r,o,s,a="{",l=!1,u=[];(a=t.indexOf(a))!==-1;){if(i=t.slice(0,a),l){for(n=i.split(":"),r=n.shift().split("."),s=r.length,i=e,o=0;o<s;o++)i=i[r[o]];n.length&&(n=n.join(":"),r=/\.([0-9])/,o=H.lang,s=void 0,/f$/.test(n)?(s=(s=n.match(r))?s[1]:-1,null!==i&&(i=rt.numberFormat(i,s,o.decimalPoint,n.indexOf(",")>-1?o.thousandsSep:""))):i=F(n,i))}u.push(i),t=t.slice(a+1),a=(l=!l)?"}":"{"}return u.push(t),u.join("")}function b(t){return st.pow(10,lt(st.log(t)/st.LN10))}function _(t,e,i,n,r){var o,s=t,i=Kt(i,1);for(o=t/i,e||(e=[1,2,2.5,5,10],n===!1&&(1===i?e=[1,2,5,10]:i<=.1&&(e=[1/i]))),n=0;n<e.length&&(s=e[n],!(r&&s*i>=t||!r&&o<=(e[n]+(e[n+1]||e[n]))/2));n++);return s*=i}function w(t,e){var i,n,r=t.length;for(n=0;n<r;n++)t[n].safeI=n;for(t.sort(function(t,n){return i=e(t,n),0===i?t.safeI-n.safeI:i}),n=0;n<r;n++)delete t[n].safeI}function x(t){for(var e=t.length,i=t[0];e--;)t[e]<i&&(i=t[e]);return i}function k(t){for(var e=t.length,i=t[0];e--;)t[e]>i&&(i=t[e]);return i}function C(t,e){for(var i in t)t[i]&&t[i]!==e&&t[i].destroy&&t[i].destroy(),delete t[i]}function M(t){Y||(Y=f(Pt)),t&&Y.appendChild(t),Y.innerHTML=""}function T(t,e){return parseFloat(t.toPrecision(e||14))}function S(t,e){e.renderer.globalAnimation=Kt(t,e.animation)}function D(t){return s(t)?n(t):{duration:t?500:0}}function L(){var e=H.global,i=e.useUTC,n=i?"getUTC":"get",r=i?"setUTC":"set";W=e.Date||t.Date,B=i&&e.timezoneOffset,$=i&&e.getTimezoneOffset,z=function(t,e,n,r,o,s){var a;return i?(a=W.UTC.apply(0,arguments),a+=v(a)):a=new W(t,e,Kt(n,1),Kt(r,0),Kt(o,0),Kt(s,0)).getTime(),a},q=n+"Minutes",U=n+"Hours",V=n+"Day",G=n+"Date",X=n+"Month",J=n+"FullYear",K=r+"Milliseconds",Q=r+"Seconds",Z=r+"Minutes",tt=r+"Hours",et=r+"Date",it=r+"Month",nt=r+"FullYear"}function A(t){return this instanceof A?void this.init(t):new A(t)}function E(){}function I(t,e,i,n){this.axis=t,this.pos=e,this.type=i||"",this.isNew=!0,!i&&!n&&this.addLabel()}function P(t,e,i,n,r){var o=t.chart.inverted;this.axis=t,this.isNegative=i,this.options=e,this.x=n,this.total=null,this.points={},this.stack=r,this.rightCliff=this.leftCliff=0,this.alignOptions={align:e.align||(o?i?"left":"right":"center"),verticalAlign:e.verticalAlign||(o?"middle":i?"bottom":"top"),y:Kt(e.y,o?4:i?14:-6),x:Kt(e.x,o?i?-6:6:0)},this.textAlign=e.textAlign||(o?i?"right":"left":"center")}var O,j,N,Y,H,F,R,W,z,B,$,q,U,V,G,X,J,K,Q,Z,tt,et,it,nt,rt,ot=t.document,st=Math,at=st.round,lt=st.floor,ut=st.ceil,ct=st.max,ht=st.min,dt=st.abs,pt=st.cos,ft=st.sin,mt=st.PI,gt=2*mt/360,vt=t.navigator&&t.navigator.userAgent||"",yt=t.opera,bt=/(msie|trident|edge)/i.test(vt)&&!yt,_t=ot&&8===ot.documentMode,wt=!bt&&/AppleWebKit/.test(vt),xt=/Firefox/.test(vt),kt=/(Mobile|Android|Windows Phone)/.test(vt),Ct="http://www.w3.org/2000/svg",Mt=ot&&ot.createElementNS&&!!ot.createElementNS(Ct,"svg").createSVGRect,Tt=xt&&parseInt(vt.split("Firefox/")[1],10)<4,St=ot&&!Mt&&!bt&&!!ot.createElement("canvas").getContext,Dt={},Lt=0,At=function(){},Et=[],It=0,Pt="div",Ot=/^[0-9]+$/,jt=["plotTop","marginRight","marginBottom","plotLeft"],Nt={};rt=t.Highcharts?e(16,!0):{win:t},rt.seriesTypes=Nt;var Yt,Ht,Ft,Rt,Wt,zt,Bt,$t,qt,Ut,Vt,Gt=[];i.prototype={dSetter:function(){var t,e=this.paths[0],i=this.paths[1],n=[],r=this.now,o=e.length;if(1===r)n=this.toD;else if(o===i.length&&r<1)for(;o--;)t=parseFloat(e[o]),n[o]=isNaN(t)?e[o]:r*parseFloat(i[o]-t)+t;else n=i;this.elem.attr("d",n)},update:function(){var t=this.elem,e=this.prop,i=this.now,n=this.options.step;this[e+"Setter"]?this[e+"Setter"]():t.attr?t.element&&t.attr(e,i):t.style[e]=i+this.unit,n&&n.call(t,i,this)},run:function(t,e,i){var n,r=this,o=function(t){return!o.stopped&&r.step(t)};this.startTime=+new W,this.start=t,this.end=e,this.unit=i,this.now=this.start,this.pos=0,o.elem=this.elem,o()&&1===Gt.push(o)&&(o.timerId=setInterval(function(){for(n=0;n<Gt.length;n++)Gt[n]()||Gt.splice(n--,1);Gt.length||clearInterval(o.timerId)},13))},step:function(t){var e,i=+new W,n=this.options;e=this.elem;var r,o=n.complete,s=n.duration,a=n.curAnim;if(e.attr&&!e.element)e=!1;else if(t||i>=s+this.startTime){this.now=this.end,this.pos=1,this.update(),t=a[this.prop]=!0;for(r in a)a[r]!==!0&&(t=!1);t&&o&&o.call(e),e=!1}else this.pos=n.easing((i-this.startTime)/s),this.now=this.start+(this.end-this.start)*this.pos,this.update(),e=!0;return e},initPath:function(t,e,i){var n,e=e||"",r=t.shift,o=e.indexOf("C")>-1,s=o?7:3,e=e.split(" "),i=[].concat(i),a=t.isArea,l=a?2:1,u=function(t){
for(n=t.length;n--;)("M"===t[n]||"L"===t[n])&&t.splice(n+1,0,t[n+1],t[n+2],t[n+1],t[n+2])};if(o&&(u(e),u(i)),r<=i.length/s&&e.length===i.length)for(;r--;)i=i.slice(0,s).concat(i),a&&(i=i.concat(i.slice(i.length-s)));if(t.shift=0,e.length)for(t=i.length;e.length<t;)r=e.slice().splice(e.length/l-s,s*l),o&&(r[s-6]=r[s-2],r[s-5]=r[s-1]),[].splice.apply(e,[e.length/l,0].concat(r));return[e,i]}};var Xt=rt.extend=function(t,e){var i;t||(t={});for(i in e)t[i]=e[i];return t},Jt=rt.isNumber=function(t){return"number"==typeof t&&!isNaN(t)},Kt=rt.pick=function(){var t,e,i=arguments,n=i.length;for(t=0;t<n;t++)if(e=i[t],e!==O&&null!==e)return e},Qt=rt.wrap=function(t,e,i){var n=t[e];t[e]=function(){var t=Array.prototype.slice.call(arguments);return t.unshift(n),i.apply(this,t)}};F=function(t,e,i){if(!Jt(e))return H.lang.invalidDate||"";var n,t=Kt(t,"%Y-%m-%d %H:%M:%S"),r=new W(e-v(e)),o=r[U](),s=r[V](),a=r[G](),l=r[X](),u=r[J](),c=H.lang,h=c.weekdays,d=c.shortWeekdays,r=Xt({a:d?d[s]:h[s].substr(0,3),A:h[s],d:g(a),e:g(a,2," "),w:s,b:c.shortMonths[l],B:c.months[l],m:g(l+1),y:u.toString().substr(2,2),Y:u,H:g(o),k:o,I:g(o%12||12),l:o%12||12,M:g(r[q]()),p:o<12?"AM":"PM",P:o<12?"am":"pm",S:g(r.getSeconds()),L:g(at(e%1e3),3)},rt.dateFormats);for(n in r)for(;t.indexOf("%"+n)!==-1;)t=t.replace("%"+n,"function"==typeof r[n]?r[n](e):r[n]);return i?t.substr(0,1).toUpperCase()+t.substr(1):t},R={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:24192e5,year:314496e5},rt.numberFormat=function(t,e,i,n){var o,s,t=+t||0,e=+e,a=H.lang,l=(t.toString().split(".")[1]||"").length,u=Math.abs(t);return e===-1?e=Math.min(l,20):Jt(e)||(e=2),o=String(r(u.toFixed(e))),s=o.length>3?o.length%3:0,i=Kt(i,a.decimalPoint),n=Kt(n,a.thousandsSep),t=t<0?"-":"",t+=s?o.substr(0,s)+n:"",t+=o.substr(s).replace(/(\d{3})(?=\d)/g,"$1"+n),e&&(n=Math.abs(u-o+Math.pow(10,-Math.max(e,l)-1)),t+=i+n.toFixed(e).slice(2)),t},Math.easeInOutSine=function(t){return-.5*(Math.cos(Math.PI*t)-1)},Yt=function(e,i){var n;return"width"===i?Math.min(e.offsetWidth,e.scrollWidth)-Yt(e,"padding-left")-Yt(e,"padding-right"):"height"===i?Math.min(e.offsetHeight,e.scrollHeight)-Yt(e,"padding-top")-Yt(e,"padding-bottom"):(n=t.getComputedStyle(e,void 0))&&r(n.getPropertyValue(i))},Ht=function(t,e){return e.indexOf?e.indexOf(t):[].indexOf.call(e,t)},Rt=function(t,e){return[].filter.call(t,e)},zt=function(t,e){for(var i=[],n=0,r=t.length;n<r;n++)i[n]=e.call(t[n],t[n],n,t);return i},Wt=function(e){var i=ot.documentElement,e=e.getBoundingClientRect();return{top:e.top+(t.pageYOffset||i.scrollTop)-(i.clientTop||0),left:e.left+(t.pageXOffset||i.scrollLeft)-(i.clientLeft||0)}},Vt=function(t){for(var e=Gt.length;e--;)Gt[e].elem===t&&(Gt[e].stopped=!0)},Ft=function(t,e){return Array.prototype.forEach.call(t,e)},Bt=function(e,i,n){function r(i){i.target=i.srcElement||t,n.call(e,i)}var o=e.hcEvents=e.hcEvents||{};e.addEventListener?e.addEventListener(i,n,!1):e.attachEvent&&(e.hcEventsIE||(e.hcEventsIE={}),e.hcEventsIE[n.toString()]=r,e.attachEvent("on"+i,r)),o[i]||(o[i]=[]),o[i].push(n)},$t=function(t,e,i){function n(e,i){t.removeEventListener?t.removeEventListener(e,i,!1):t.attachEvent&&(i=t.hcEventsIE[i.toString()],t.detachEvent("on"+e,i))}function r(){var i,r,o;if(t.nodeName)for(o in e?(i={},i[e]=!0):i=a,i)if(a[o])for(r=a[o].length;r--;)n(o,a[o][r])}var o,s,a=t.hcEvents;a&&(e?(o=a[e]||[],i?(s=Ht(i,o),s>-1&&(o.splice(s,1),a[e]=o),n(e,i)):(r(),a[e]=[])):(r(),t.hcEvents={}))},qt=function(t,e,i,n){var r;r=t.hcEvents;var o,s,i=i||{};if(ot.createEvent&&(t.dispatchEvent||t.fireEvent))r=ot.createEvent("Events"),r.initEvent(e,!0,!0),r.target=t,Xt(r,i),t.dispatchEvent?t.dispatchEvent(r):t.fireEvent(e,r);else if(r)for(r=r[e]||[],o=r.length,i.preventDefault||(i.preventDefault=function(){i.defaultPrevented=!0}),i.target=t,i.type||(i.type=e),e=0;e<o;e++)s=r[e],s.call(t,i)===!1&&i.preventDefault();n&&!i.defaultPrevented&&n(i)},Ut=function(t,e,r){var o,a,l,u,c="";s(r)||(o=arguments,r={duration:o[2],easing:o[3],complete:o[4]}),Jt(r.duration)||(r.duration=400),r.easing="function"==typeof r.easing?r.easing:Math[r.easing]||Math.easeInOutSine,r.curAnim=n(e);for(u in e)l=new i(t,r,u),a=null,"d"===u?(l.paths=l.initPath(t,t.d,e.d),l.toD=e.d,o=0,a=1):t.attr?o=t.attr(u):(o=parseFloat(Yt(t,u))||0,"opacity"!==u&&(c="px")),a||(a=e[u]),a.match&&a.match("px")&&(a=a.replace(/px/g,"")),l.run(o,a,c)},t.jQuery&&(t.jQuery.fn.highcharts=function(){var t=[].slice.call(arguments);if(this[0])return t[0]?(new(rt[o(t[0])?t.shift():"Chart"])(this[0],t[0],t[1]),this):Et[c(this[0],"data-highcharts-chart")]}),ot&&!ot.defaultView&&(Yt=function(t,e){var i;return i={width:"clientWidth",height:"clientHeight"}[e],t.style[e]?r(t.style[e]):("opacity"===e&&(e="filter"),i?(t.style.zoom=1,Math.max(t[i]-2*Yt(t,"padding"),0)):(i=t.currentStyle[e.replace(/\-(\w)/g,function(t,e){return e.toUpperCase()})],"filter"===e&&(i=i.replace(/alpha\(opacity=([0-9]+)\)/,function(t,e){return e/100})),""===i?1:r(i)))}),Array.prototype.forEach||(Ft=function(t,e){for(var i=0,n=t.length;i<n;i++)if(e.call(t[i],t[i],i,t)===!1)return i}),Array.prototype.indexOf||(Ht=function(t,e){var i,n=0;if(e)for(i=e.length;n<i;n++)if(e[n]===t)return n;return-1}),Array.prototype.filter||(Rt=function(t,e){for(var i=[],n=0,r=t.length;n<r;n++)e(t[n],n)&&i.push(t[n]);return i}),rt.Fx=i,rt.inArray=Ht,rt.each=Ft,rt.grep=Rt,rt.offset=Wt,rt.map=zt,rt.addEvent=Bt,rt.removeEvent=$t,rt.fireEvent=qt,rt.animate=Ut,rt.animObject=D,rt.stop=Vt,H={colors:"#7cb5ec,#434348,#90ed7d,#f7a35c,#8085e9,#f15c80,#e4d354,#2b908f,#f45b5b,#91e8e1".split(","),symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),shortMonths:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),decimalPoint:".",numericSymbols:"k,M,G,T,P,E".split(","),resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:" "},global:{useUTC:!0,canvasToolsURL:"http://code.highcharts.com/modules/canvas-tools.js",VMLRadialGradientURL:"http://code.highcharts.com/4.2.5/gfx/vml-radial-gradient.png"},chart:{borderColor:"#4572A7",borderRadius:0,defaultSeriesType:"line",ignoreHiddenSeries:!0,spacing:[10,10,15,10],backgroundColor:"#FFFFFF",plotBorderColor:"#C0C0C0",resetZoomButton:{theme:{zIndex:20},position:{align:"right",x:-10,y:10}}},title:{text:"Chart title",align:"center",margin:15,style:{color:"#333333",fontSize:"18px"},widthAdjust:-44},subtitle:{text:"",align:"center",style:{color:"#555555"},widthAdjust:-44},plotOptions:{line:{allowPointSelect:!1,showCheckbox:!1,animation:{duration:1e3},events:{},lineWidth:2,marker:{lineWidth:0,radius:4,lineColor:"#FFFFFF",states:{hover:{enabled:!0,lineWidthPlus:1,radiusPlus:2},select:{fillColor:"#FFFFFF",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:{align:"center",formatter:function(){return null===this.y?"":rt.numberFormat(this.y,-1)},style:{color:"contrast",fontSize:"11px",fontWeight:"bold",textShadow:"0 0 6px contrast, 0 0 3px contrast"},verticalAlign:"bottom",x:0,y:0,padding:5},cropThreshold:300,pointRange:0,softThreshold:!0,states:{hover:{lineWidthPlus:1,marker:{},halo:{size:10,opacity:.25}},select:{marker:{}}},stickyTracking:!0,turboThreshold:1e3}},labels:{style:{position:"absolute",color:"#3E576F"}},legend:{enabled:!0,align:"center",layout:"horizontal",labelFormatter:function(){return this.name},borderColor:"#909090",borderRadius:0,navigation:{activeColor:"#274b6d",inactiveColor:"#CCC"},shadow:!1,itemStyle:{color:"#333333",fontSize:"12px",fontWeight:"bold"},itemHoverStyle:{color:"#000"},itemHiddenStyle:{color:"#CCC"},itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},symbolPadding:5,verticalAlign:"bottom",x:0,y:0,title:{style:{fontWeight:"bold"}}},loading:{labelStyle:{fontWeight:"bold",position:"relative",top:"45%"},style:{position:"absolute",backgroundColor:"white",opacity:.5,textAlign:"center"}},tooltip:{enabled:!0,animation:Mt,backgroundColor:"rgba(249, 249, 249, .85)",borderWidth:1,borderRadius:3,dateTimeLabelFormats:{millisecond:"%A, %b %e, %H:%M:%S.%L",second:"%A, %b %e, %H:%M:%S",minute:"%A, %b %e, %H:%M",hour:"%A, %b %e, %H:%M",day:"%A, %b %e, %Y",week:"Week from %A, %b %e, %Y",month:"%B %Y",year:"%Y"},footerFormat:"",headerFormat:'<span style="font-size: 10px">{point.key}</span><br/>',pointFormat:'<span style="color:{point.color}">\u25cf</span> {series.name}: <b>{point.y}</b><br/>',shadow:!0,snap:kt?25:10,style:{color:"#333333",cursor:"default",fontSize:"12px",padding:"8px",pointerEvents:"none",whiteSpace:"nowrap"}},credits:{enabled:!0,text:"Highcharts.com",href:"http://www.highcharts.com",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#909090",fontSize:"9px"}}};var Zt=H.plotOptions,te=Zt.line;L(),A.prototype={parsers:[{regex:/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*\)/,parse:function(t){return[r(t[1]),r(t[2]),r(t[3]),parseFloat(t[4],10)]}},{regex:/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/,parse:function(t){return[r(t[1],16),r(t[2],16),r(t[3],16),1]}},{regex:/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/,parse:function(t){return[r(t[1]),r(t[2]),r(t[3]),1]}}],init:function(t){var e,i,n,r;if((this.input=t)&&t.stops)this.stops=zt(t.stops,function(t){return new A(t[1])});else for(n=this.parsers.length;n--&&!i;)r=this.parsers[n],(e=r.regex.exec(t))&&(i=r.parse(e));this.rgba=i||[]},get:function(t){var e,i=this.input,r=this.rgba;return this.stops?(e=n(i),e.stops=[].concat(e.stops),Ft(this.stops,function(i,n){e.stops[n]=[e.stops[n][0],i.get(t)]})):e=r&&Jt(r[0])?"rgb"===t||!t&&1===r[3]?"rgb("+r[0]+","+r[1]+","+r[2]+")":"a"===t?r[3]:"rgba("+r.join(",")+")":i,e},brighten:function(t){var e,i=this.rgba;if(this.stops)Ft(this.stops,function(e){e.brighten(t)});else if(Jt(t)&&0!==t)for(e=0;e<3;e++)i[e]+=r(255*t),i[e]<0&&(i[e]=0),i[e]>255&&(i[e]=255);return this},setOpacity:function(t){return this.rgba[3]=t,this}},E.prototype={opacity:1,textProps:"direction,fontSize,fontWeight,fontFamily,fontStyle,color,lineHeight,width,textDecoration,textOverflow,textShadow".split(","),init:function(t,e){this.element="span"===e?f(e):ot.createElementNS(Ct,e),this.renderer=t},animate:function(t,e,i){return e=Kt(e,this.renderer.globalAnimation,!0),Vt(this),e?(i&&(e.complete=i),Ut(this,t,e)):this.attr(t,null,i),this},colorGradient:function(t,e,i){var r,o,s,l,c,h,d,p,f,m,g,v,y=this.renderer,b=[];if(t.linearGradient?o="linearGradient":t.radialGradient&&(o="radialGradient"),o){s=t[o],c=y.gradients,d=t.stops,m=i.radialReference,a(s)&&(t[o]=s={x1:s[0],y1:s[1],x2:s[2],y2:s[3],gradientUnits:"userSpaceOnUse"}),"radialGradient"===o&&m&&!u(s.gradientUnits)&&(l=s,s=n(s,y.getRadialAttr(m,l),{gradientUnits:"userSpaceOnUse"}));for(g in s)"id"!==g&&b.push(g,s[g]);for(g in d)b.push(d[g]);b=b.join(","),c[b]?m=c[b].attr("id"):(s.id=m="highcharts-"+Lt++,c[b]=h=y.createElement(o).attr(s).add(y.defs),h.radAttr=l,h.stops=[],Ft(d,function(t){0===t[1].indexOf("rgba")?(r=A(t[1]),p=r.get("rgb"),f=r.get("a")):(p=t[1],f=1),t=y.createElement("stop").attr({offset:t[0],"stop-color":p,"stop-opacity":f}).add(h),h.stops.push(t)})),v="url("+y.url+"#"+m+")",i.setAttribute(e,v),i.gradient=b,t.toString=function(){return v}}},applyTextShadow:function(t){var e,i=this.element,n=t.indexOf("contrast")!==-1,o={},s=this.renderer.forExport,a=s||i.style.textShadow!==O&&!bt;n&&(o.textShadow=t=t.replace(/contrast/g,this.renderer.getContrast(i.style.fill))),(wt||s)&&(o.textRendering="geometricPrecision"),a?this.css(o):(this.fakeTS=!0,this.ySetter=this.xSetter,e=[].slice.call(i.getElementsByTagName("tspan")),Ft(t.split(/\s?,\s?/g),function(t){var n,o,s=i.firstChild,t=t.split(" ");n=t[t.length-1],(o=t[t.length-2])&&Ft(e,function(t,e){var a;0===e&&(t.setAttribute("x",i.getAttribute("x")),e=i.getAttribute("y"),t.setAttribute("y",e||0),null===e&&i.setAttribute("y",0)),a=t.cloneNode(1),c(a,{"class":"highcharts-text-shadow",fill:n,stroke:n,"stroke-opacity":1/ct(r(o),3),"stroke-width":o,"stroke-linejoin":"round"}),i.insertBefore(a,s)})}))},attr:function(t,e,i){var n,r,o,s=this.element,a=this;if("string"==typeof t&&e!==O&&(n=t,t={},t[n]=e),"string"==typeof t)a=(this[t+"Getter"]||this._defaultGetter).call(this,t,s);else{for(n in t)e=t[n],o=!1,this.symbolName&&/^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)/.test(n)&&(r||(this.symbolAttr(t),r=!0),o=!0),!this.rotation||"x"!==n&&"y"!==n||(this.doTransform=!0),o||(o=this[n+"Setter"]||this._defaultSetter,o.call(this,e,n,s),this.shadows&&/^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(n)&&this.updateShadows(n,e,o));this.doTransform&&(this.updateTransform(),this.doTransform=!1)}return i&&i(),a},updateShadows:function(t,e,i){for(var n=this.shadows,r=n.length;r--;)i.call(n[r],"height"===t?Math.max(e-(n[r].cutHeight||0),0):"d"===t?this.d:e,t,n[r])},addClass:function(t){var e=this.element,i=c(e,"class")||"";return i.indexOf(t)===-1&&c(e,"class",i+" "+t),this},symbolAttr:function(t){var e=this;Ft("x,y,r,start,end,width,height,innerR,anchorX,anchorY".split(","),function(i){e[i]=Kt(t[i],e[i])}),e.attr({d:e.renderer.symbols[e.symbolName](e.x,e.y,e.width,e.height,e)})},clip:function(t){return this.attr("clip-path",t?"url("+this.renderer.url+"#"+t.id+")":"none")},crisp:function(t){var e,i,n={},r=this.strokeWidth||0;i=at(r)%2/2,t.x=lt(t.x||this.x||0)+i,t.y=lt(t.y||this.y||0)+i,t.width=lt((t.width||this.width||0)-2*i),t.height=lt((t.height||this.height||0)-2*i),t.strokeWidth=r;for(e in t)this[e]!==t[e]&&(this[e]=n[e]=t[e]);return n},css:function(t){var e,i,n=this.styles,o={},s=this.element,a="";if(e=!n,t&&t.color&&(t.fill=t.color),n)for(i in t)t[i]!==n[i]&&(o[i]=t[i],e=!0);if(e){if(e=this.textWidth=t&&t.width&&"text"===s.nodeName.toLowerCase()&&r(t.width)||this.textWidth,n&&(t=Xt(n,o)),this.styles=t,e&&(St||!Mt&&this.renderer.forExport)&&delete t.width,bt&&!Mt)p(this.element,t);else{n=function(t,e){return"-"+e.toLowerCase()};for(i in t)a+=i.replace(/([A-Z])/g,n)+":"+t[i]+";";c(s,"style",a)}e&&this.added&&this.renderer.buildText(this)}return this},on:function(t,e){var i=this,n=i.element;return N&&"click"===t?(n.ontouchstart=function(t){i.touchEventFired=W.now(),t.preventDefault(),e.call(n,t)},n.onclick=function(t){(vt.indexOf("Android")===-1||W.now()-(i.touchEventFired||0)>1100)&&e.call(n,t)}):n["on"+t]=e,this},setRadialReference:function(t){var e=this.renderer.gradients[this.element.gradient];return this.element.radialReference=t,e&&e.radAttr&&e.animate(this.renderer.getRadialAttr(t,e.radAttr)),this},translate:function(t,e){return this.attr({translateX:t,translateY:e})},invert:function(){return this.inverted=!0,this.updateTransform(),this},updateTransform:function(){var t=this.translateX||0,e=this.translateY||0,i=this.scaleX,n=this.scaleY,r=this.inverted,o=this.rotation,s=this.element;r&&(t+=this.attr("width"),e+=this.attr("height")),t=["translate("+t+","+e+")"],r?t.push("rotate(90) scale(-1,1)"):o&&t.push("rotate("+o+" "+(s.getAttribute("x")||0)+" "+(s.getAttribute("y")||0)+")"),(u(i)||u(n))&&t.push("scale("+Kt(i,1)+" "+Kt(n,1)+")"),t.length&&s.setAttribute("transform",t.join(" "))},toFront:function(){var t=this.element;return t.parentNode.appendChild(t),this},align:function(t,e,i){var n,r,s,a,u={};return r=this.renderer,s=r.alignedObjects,t?(this.alignOptions=t,this.alignByTranslate=e,(!i||o(i))&&(this.alignTo=n=i||"renderer",l(s,this),s.push(this),i=null)):(t=this.alignOptions,e=this.alignByTranslate,n=this.alignTo),i=Kt(i,r[n],r),n=t.align,r=t.verticalAlign,s=(i.x||0)+(t.x||0),a=(i.y||0)+(t.y||0),"right"!==n&&"center"!==n||(s+=(i.width-(t.width||0))/{right:1,center:2}[n]),u[e?"translateX":"x"]=at(s),"bottom"!==r&&"middle"!==r||(a+=(i.height-(t.height||0))/({bottom:1,middle:2}[r]||1)),u[e?"translateY":"y"]=at(a),this[this.placed?"animate":"attr"](u),this.placed=!0,this.alignAttr=u,this},getBBox:function(t,e){var i,n,r,o,s=this.renderer,a=this.element,l=this.styles;n=this.textStr;var u,c,h,d=a.style,p=s.cache,f=s.cacheKeys;if(r=Kt(e,this.rotation),o=r*gt,n!==O&&(h=["",r||0,l&&l.fontSize,a.style.width].join(","),h=""===n||Ot.test(n)?"num:"+n.toString().length+h:n+h),h&&!t&&(i=p[h]),!i){if(a.namespaceURI===Ct||s.forExport){try{c=this.fakeTS&&function(t){Ft(a.querySelectorAll(".highcharts-text-shadow"),function(e){e.style.display=t})},xt&&d.textShadow?(u=d.textShadow,d.textShadow=""):c&&c("none"),i=a.getBBox?Xt({},a.getBBox()):{width:a.offsetWidth,height:a.offsetHeight},u?d.textShadow=u:c&&c("")}catch(t){}(!i||i.width<0)&&(i={width:0,height:0})}else i=this.htmlGetBBox();if(s.isSVG&&(s=i.width,n=i.height,bt&&l&&"11px"===l.fontSize&&"16.9"===n.toPrecision(3)&&(i.height=n=14),r&&(i.width=dt(n*ft(o))+dt(s*pt(o)),i.height=dt(n*pt(o))+dt(s*ft(o)))),h){for(;f.length>250;)delete p[f.shift()];p[h]||f.push(h),p[h]=i}}return i},show:function(t){return this.attr({visibility:t?"inherit":"visible"})},hide:function(){return this.attr({visibility:"hidden"})},fadeOut:function(t){var e=this;e.animate({opacity:0},{duration:t||150,complete:function(){e.attr({y:-9999})}})},add:function(t){var e,i=this.renderer,n=this.element;return t&&(this.parentGroup=t),this.parentInverted=t&&t.inverted,void 0!==this.textStr&&i.buildText(this),this.added=!0,(!t||t.handleZ||this.zIndex)&&(e=this.zIndexSetter()),e||(t?t.element:i.box).appendChild(n),this.onAdd&&this.onAdd(),this},safeRemoveChild:function(t){var e=t.parentNode;e&&e.removeChild(t)},destroy:function(){var t,e,i=this,n=i.element||{},r=i.shadows,o=i.renderer.isSVG&&"SPAN"===n.nodeName&&i.parentGroup;if(n.onclick=n.onmouseout=n.onmouseover=n.onmousemove=n.point=null,Vt(i),i.clipPath&&(i.clipPath=i.clipPath.destroy()),i.stops){for(e=0;e<i.stops.length;e++)i.stops[e]=i.stops[e].destroy();i.stops=null}for(i.safeRemoveChild(n),r&&Ft(r,function(t){i.safeRemoveChild(t)});o&&o.div&&0===o.div.childNodes.length;)n=o.parentGroup,i.safeRemoveChild(o.div),delete o.div,o=n;i.alignTo&&l(i.renderer.alignedObjects,i);for(t in i)delete i[t];return null},shadow:function(t,e,i){var n,r,o,s,a,l,u=[],h=this.element;if(t){for(s=Kt(t.width,3),a=(t.opacity||.15)/s,l=this.parentInverted?"(-1,-1)":"("+Kt(t.offsetX,1)+", "+Kt(t.offsetY,1)+")",n=1;n<=s;n++)r=h.cloneNode(0),o=2*s+1-2*n,c(r,{isShadow:"true",stroke:t.color||"black","stroke-opacity":a*n,"stroke-width":o,transform:"translate"+l,fill:"none"}),i&&(c(r,"height",ct(c(r,"height")-o,0)),r.cutHeight=o),e?e.element.appendChild(r):h.parentNode.insertBefore(r,h),u.push(r);this.shadows=u}return this},xGetter:function(t){return"circle"===this.element.nodeName&&(t={x:"cx",y:"cy"}[t]||t),this._defaultGetter(t)},_defaultGetter:function(t){return t=Kt(this[t],this.element?this.element.getAttribute(t):null,0),/^[\-0-9\.]+$/.test(t)&&(t=parseFloat(t)),t},dSetter:function(t,e,i){t&&t.join&&(t=t.join(" ")),/(NaN| {2}|^$)/.test(t)&&(t="M 0 0"),i.setAttribute(e,t),this[e]=t},dashstyleSetter:function(t){var e,i=this["stroke-width"];if("inherit"===i&&(i=1),t=t&&t.toLowerCase()){for(t=t.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(","),e=t.length;e--;)t[e]=r(t[e])*i;t=t.join(",").replace(/NaN/g,"none"),this.element.setAttribute("stroke-dasharray",t)}},alignSetter:function(t){this.element.setAttribute("text-anchor",{left:"start",center:"middle",right:"end"}[t])},opacitySetter:function(t,e,i){this[e]=t,i.setAttribute(e,t)},titleSetter:function(t){var e=this.element.getElementsByTagName("title")[0];e||(e=ot.createElementNS(Ct,"title"),this.element.appendChild(e)),e.firstChild&&e.removeChild(e.firstChild),e.appendChild(ot.createTextNode(String(Kt(t),"").replace(/<[^>]*>/g,"")))},textSetter:function(t){t!==this.textStr&&(delete this.bBox,this.textStr=t,this.added&&this.renderer.buildText(this))},fillSetter:function(t,e,i){"string"==typeof t?i.setAttribute(e,t):t&&this.colorGradient(t,e,i)},visibilitySetter:function(t,e,i){"inherit"===t?i.removeAttribute(e):i.setAttribute(e,t)},zIndexSetter:function(t,e){var i,n,o,s=this.renderer,a=this.parentGroup,s=(a||s).element||s.box,l=this.element;i=this.added;var c;if(u(t)&&(l.zIndex=t,t=+t,this[e]===t&&(i=!1),this[e]=t),i){for((t=this.zIndex)&&a&&(a.handleZ=!0),a=s.childNodes,c=0;c<a.length&&!o;c++)i=a[c],n=i.zIndex,i!==l&&(r(n)>t||!u(t)&&u(n))&&(s.insertBefore(l,i),o=!0);o||s.appendChild(l)}return o},_defaultSetter:function(t,e,i){i.setAttribute(e,t)}},E.prototype.yGetter=E.prototype.xGetter,E.prototype.translateXSetter=E.prototype.translateYSetter=E.prototype.rotationSetter=E.prototype.verticalAlignSetter=E.prototype.scaleXSetter=E.prototype.scaleYSetter=function(t,e){this[e]=t,this.doTransform=!0},E.prototype["stroke-widthSetter"]=E.prototype.strokeSetter=function(t,e,i){this[e]=t,this.stroke&&this["stroke-width"]?(this.strokeWidth=this["stroke-width"],E.prototype.fillSetter.call(this,this.stroke,"stroke",i),i.setAttribute("stroke-width",this["stroke-width"]),this.hasStroke=!0):"stroke-width"===e&&0===t&&this.hasStroke&&(i.removeAttribute("stroke"),this.hasStroke=!1)};var ee=function(){this.init.apply(this,arguments)};ee.prototype={Element:E,init:function(e,i,n,r,o,s){var a,r=this.createElement("svg").attr({version:"1.1"}).css(this.getStyle(r));a=r.element,e.appendChild(a),e.innerHTML.indexOf("xmlns")===-1&&c(a,"xmlns",Ct),this.isSVG=!0,this.box=a,this.boxWrapper=r,this.alignedObjects=[],this.url=(xt||wt)&&ot.getElementsByTagName("base").length?t.location.href.replace(/#.*?$/,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20"):"",this.createElement("desc").add().element.appendChild(ot.createTextNode("Created with Highcharts 4.2.5")),this.defs=this.createElement("defs").add(),this.allowHTML=s,this.forExport=o,this.gradients={},this.cache={},this.cacheKeys=[],this.imgCount=0,this.setSize(i,n,!1);var l;xt&&e.getBoundingClientRect&&(this.subPixelFix=i=function(){p(e,{left:0,top:0}),l=e.getBoundingClientRect(),p(e,{left:ut(l.left)-l.left+"px",top:ut(l.top)-l.top+"px"})},i(),Bt(t,"resize",i))},getStyle:function(t){return this.style=Xt({fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif',fontSize:"12px"},t)},isHidden:function(){return!this.boxWrapper.getBBox().width},destroy:function(){var e=this.defs;return this.box=null,this.boxWrapper=this.boxWrapper.destroy(),C(this.gradients||{}),this.gradients=null,e&&(this.defs=e.destroy()),this.subPixelFix&&$t(t,"resize",this.subPixelFix),this.alignedObjects=null},createElement:function(t){var e=new this.Element;return e.init(this,t),e},draw:function(){},getRadialAttr:function(t,e){return{cx:t[0]-t[2]/2+e.cx*t[2],cy:t[1]-t[2]/2+e.cy*t[2],r:e.r*t[2]}},buildText:function(t){for(var e,i,n,o=t.element,s=this,a=s.forExport,l=Kt(t.textStr,"").toString(),u=l.indexOf("<")!==-1,h=o.childNodes,d=c(o,"x"),f=t.styles,m=t.textWidth,g=f&&f.lineHeight,v=f&&f.textShadow,y=f&&"ellipsis"===f.textOverflow,b=h.length,_=m&&!t.added&&this.box,w=function(t){return g?r(g):s.fontMetrics(/(px|em)$/.test(t&&t.style.fontSize)?t.style.fontSize:f&&f.fontSize||s.style.fontSize||12,t).h},x=function(t){return t.replace(/&lt;/g,"<").replace(/&gt;/g,">")};b--;)o.removeChild(h[b]);u||v||y||l.indexOf(" ")!==-1?(e=/<.*style="([^"]+)".*>/,i=/<.*href="(http[^"]+)".*>/,_&&_.appendChild(o),l=u?l.replace(/<(b|strong)>/g,'<span style="font-weight:bold">').replace(/<(i|em)>/g,'<span style="font-style:italic">').replace(/<a/g,"<span").replace(/<\/(b|strong|i|em|a)>/g,"</span>").split(/<br.*?>/g):[l],l=Rt(l,function(t){return""!==t}),Ft(l,function(r,l){var u,h=0,r=r.replace(/^\s+|\s+$/g,"").replace(/<span/g,"|||<span").replace(/<\/span>/g,"</span>|||");u=r.split("|||"),Ft(u,function(r){if(""!==r||1===u.length){var g,v={},b=ot.createElementNS(Ct,"tspan");if(e.test(r)&&(g=r.match(e)[1].replace(/(;| |^)color([ :])/,"$1fill$2"),c(b,"style",g)),i.test(r)&&!a&&(c(b,"onclick",'location.href="'+r.match(i)[1]+'"'),p(b,{cursor:"pointer"})),r=x(r.replace(/<(.|\n)*?>/g,"")||" ")," "!==r){if(b.appendChild(ot.createTextNode(r)),h?v.dx=0:l&&null!==d&&(v.x=d),c(b,v),o.appendChild(b),!h&&l&&(!Mt&&a&&p(b,{display:"block"}),c(b,"dy",w(b))),m){for(var _,k,v=r.replace(/([^\^])-/g,"$1- ").split(" "),C=u.length>1||l||v.length>1&&"nowrap"!==f.whiteSpace,M=[],T=w(b),S=1,D=t.rotation,L=r,A=L.length;(C||y)&&(v.length||M.length);)t.rotation=0,_=t.getBBox(!0),k=_.width,!Mt&&s.forExport&&(k=s.measureSpanWidth(b.firstChild.data,t.styles)),_=k>m,void 0===n&&(n=_),y&&n?(A/=2,""===L||!_&&A<.5?v=[]:(L=r.substring(0,L.length+(_?-1:1)*ut(A)),v=[L+(m>3?"\u2026":"")],b.removeChild(b.firstChild))):_&&1!==v.length?(b.removeChild(b.firstChild),M.unshift(v.pop())):(v=M,M=[],v.length&&(S++,b=ot.createElementNS(Ct,"tspan"),c(b,{dy:T,x:d}),g&&c(b,"style",g),o.appendChild(b)),k>m&&(m=k)),v.length&&b.appendChild(ot.createTextNode(v.join(" ").replace(/- /g,"-")));t.rotation=D}h++}}})}),n&&t.attr("title",t.textStr),_&&_.removeChild(o),v&&t.applyTextShadow&&t.applyTextShadow(v)):o.appendChild(ot.createTextNode(x(l)))},getContrast:function(t){return t=A(t).rgba,t[0]+t[1]+t[2]>384?"#000000":"#FFFFFF"},button:function(t,e,i,r,o,s,a,l,u){var c,h,d,p,f,m,g=this.label(t,e,i,u,null,null,null,null,"button"),v=0,t={x1:0,y1:0,x2:0,y2:1},o=n({"stroke-width":1,stroke:"#CCCCCC",fill:{linearGradient:t,stops:[[0,"#FEFEFE"],[1,"#F6F6F6"]]},r:2,padding:5,style:{color:"black"}},o);return d=o.style,delete o.style,s=n(o,{stroke:"#68A",fill:{linearGradient:t,stops:[[0,"#FFF"],[1,"#ACF"]]}},s),p=s.style,delete s.style,a=n(o,{stroke:"#68A",fill:{linearGradient:t,stops:[[0,"#9BD"],[1,"#CDF"]]}},a),f=a.style,delete a.style,l=n(o,{style:{color:"#CCC"}},l),m=l.style,delete l.style,Bt(g.element,bt?"mouseover":"mouseenter",function(){3!==v&&g.attr(s).css(p)}),Bt(g.element,bt?"mouseout":"mouseleave",function(){3!==v&&(c=[o,s,a][v],h=[d,p,f][v],g.attr(c).css(h))}),g.setState=function(t){(g.state=v=t)?2===t?g.attr(a).css(f):3===t&&g.attr(l).css(m):g.attr(o).css(d)},g.on("click",function(t){3!==v&&r.call(g,t)}).attr(o).css(Xt({cursor:"default"},d))},crispLine:function(t,e){return t[1]===t[4]&&(t[1]=t[4]=at(t[1])-e%2/2),t[2]===t[5]&&(t[2]=t[5]=at(t[2])+e%2/2),t},path:function(t){var e={fill:"none"};return a(t)?e.d=t:s(t)&&Xt(e,t),this.createElement("path").attr(e)},circle:function(t,e,i){return t=s(t)?t:{x:t,y:e,r:i},e=this.createElement("circle"),e.xSetter=e.ySetter=function(t,e,i){i.setAttribute("c"+e,t)},e.attr(t)},arc:function(t,e,i,n,r,o){return s(t)&&(e=t.y,i=t.r,n=t.innerR,r=t.start,o=t.end,t=t.x),t=this.symbol("arc",t||0,e||0,i||0,i||0,{innerR:n||0,start:r||0,end:o||0}),t.r=i,t},rect:function(t,e,i,n,r,o){var r=s(t)?t.r:r,a=this.createElement("rect"),t=s(t)?t:t===O?{}:{x:t,y:e,width:ct(i,0),height:ct(n,0)};return o!==O&&(a.strokeWidth=o,t=a.crisp(t)),r&&(t.r=r),a.rSetter=function(t,e,i){c(i,{rx:t,ry:t})},a.attr(t)},setSize:function(t,e,i){var n=this.alignedObjects,r=n.length;for(this.width=t,this.height=e,this.boxWrapper[Kt(i,!0)?"animate":"attr"]({width:t,height:e});r--;)n[r].align()},g:function(t){var e=this.createElement("g");return u(t)?e.attr({"class":"highcharts-"+t}):e},image:function(t,e,i,n,r){var o={preserveAspectRatio:"none"};return arguments.length>1&&Xt(o,{x:e,y:i,width:n,height:r}),o=this.createElement("image").attr(o),o.element.setAttributeNS?o.element.setAttributeNS("http://www.w3.org/1999/xlink","href",t):o.element.setAttribute("hc-svg-href",t),o},symbol:function(t,e,i,n,r,o){var s,a,l,u=this,c=this.symbols[t],c=c&&c(at(e),at(i),n,r,o),h=/^url\((.*?)\)$/;return c?(s=this.path(c),Xt(s,{symbolName:t,x:e,y:i,width:n,height:r}),o&&Xt(s,o)):h.test(t)&&(l=function(t,e){t.element&&(t.attr({width:e[0],height:e[1]}),t.alignByTranslate||t.translate(at((n-e[0])/2),at((r-e[1])/2)))},a=t.match(h)[1],t=Dt[a]||o&&o.width&&o.height&&[o.width,o.height],s=this.image(a).attr({x:e,y:i}),s.isImg=!0,t?l(s,t):(s.attr({width:0,height:0}),f("img",{onload:function(){0===this.width&&(p(this,{position:"absolute",top:"-999em"}),ot.body.appendChild(this)),l(s,Dt[a]=[this.width,this.height]),this.parentNode&&this.parentNode.removeChild(this),u.imgCount--,!u.imgCount&&Et[u.chartIndex].onload&&Et[u.chartIndex].onload()},src:a}),this.imgCount++)),s},symbols:{circle:function(t,e,i,n){var r=.166*i;return["M",t+i/2,e,"C",t+i+r,e,t+i+r,e+n,t+i/2,e+n,"C",t-r,e+n,t-r,e,t+i/2,e,"Z"]},square:function(t,e,i,n){return["M",t,e,"L",t+i,e,t+i,e+n,t,e+n,"Z"]},triangle:function(t,e,i,n){return["M",t+i/2,e,"L",t+i,e+n,t,e+n,"Z"]},"triangle-down":function(t,e,i,n){return["M",t,e,"L",t+i,e,t+i/2,e+n,"Z"]},diamond:function(t,e,i,n){return["M",t+i/2,e,"L",t+i,e+n/2,t+i/2,e+n,t,e+n/2,"Z"]},arc:function(t,e,i,n,r){var o=r.start,i=r.r||i||n,s=r.end-.001,n=r.innerR,a=r.open,l=pt(o),u=ft(o),c=pt(s),s=ft(s),r=r.end-o<mt?0:1;return["M",t+i*l,e+i*u,"A",i,i,0,r,1,t+i*c,e+i*s,a?"M":"L",t+n*c,e+n*s,"A",n,n,0,r,0,t+n*l,e+n*u,a?"":"Z"]},callout:function(t,e,i,n,r){var o,s=ht(r&&r.r||0,i,n),a=s+6,l=r&&r.anchorX,r=r&&r.anchorY;return o=["M",t+s,e,"L",t+i-s,e,"C",t+i,e,t+i,e,t+i,e+s,"L",t+i,e+n-s,"C",t+i,e+n,t+i,e+n,t+i-s,e+n,"L",t+s,e+n,"C",t,e+n,t,e+n,t,e+n-s,"L",t,e+s,"C",t,e,t,e,t+s,e],l&&l>i&&r>e+a&&r<e+n-a?o.splice(13,3,"L",t+i,r-6,t+i+6,r,t+i,r+6,t+i,e+n-s):l&&l<0&&r>e+a&&r<e+n-a?o.splice(33,3,"L",t,r+6,t-6,r,t,r-6,t,e+s):r&&r>n&&l>t+a&&l<t+i-a?o.splice(23,3,"L",l+6,e+n,l,e+n+6,l-6,e+n,t+s,e+n):r&&r<0&&l>t+a&&l<t+i-a&&o.splice(3,3,"L",l-6,e,l,e-6,l+6,e,i-s,e),o}},clipRect:function(t,e,i,n){var r="highcharts-"+Lt++,o=this.createElement("clipPath").attr({id:r}).add(this.defs),t=this.rect(t,e,i,n,0).add(o);return t.id=r,t.clipPath=o,t.count=0,t},text:function(t,e,i,n){var r=St||!Mt&&this.forExport,o={};return!n||!this.allowHTML&&this.forExport?(o.x=Math.round(e||0),i&&(o.y=Math.round(i)),(t||0===t)&&(o.text=t),t=this.createElement("text").attr(o),r&&t.css({position:"absolute"}),n||(t.xSetter=function(t,e,i){var n,r,o=i.getElementsByTagName("tspan"),s=i.getAttribute(e);for(r=0;r<o.length;r++)n=o[r],n.getAttribute(e)===s&&n.setAttribute(e,t);i.setAttribute(e,t)}),t):this.html(t,e,i)},fontMetrics:function(e,i){var n,o,e=e||this.style.fontSize;return!e&&i&&t.getComputedStyle&&(i=i.element||i,e=(n=t.getComputedStyle(i,""))&&n.fontSize),e=/px/.test(e)?r(e):/em/.test(e)?12*parseFloat(e):12,n=e<24?e+3:at(1.2*e),o=at(.8*n),{h:n,b:o,f:e}},rotCorr:function(t,e,i){var n=t;return e&&i&&(n=ct(n*pt(e*gt),4)),{x:-t/3*ft(e*gt),y:n}},label:function(t,e,i,r,o,s,a,l,c){var h,d,p,f,m,g,v,y,b,_,w,x=this,k=x.g(c),C=x.text("",0,0,a).attr({zIndex:1}),M=0,T=3,S=0,D=0,L={};b=function(){var t,e;t=C.element.style,d=(void 0===p||void 0===f||k.styles.textAlign)&&u(C.textStr)&&C.getBBox(),k.width=(p||d.width||0)+2*T+S,k.height=(f||d.height||0)+2*T,v=T+x.fontMetrics(t&&t.fontSize,C).b,y&&(h||(t=D,e=(l?-v:0)+D,k.box=h=r?x.symbol(r,t,e,k.width,k.height,L):x.rect(t,e,k.width,k.height,0,L["stroke-width"]),h.isImg||h.attr("fill","none"),h.add(k)),h.isImg||h.attr(Xt({width:at(k.width),height:at(k.height)},L)),L=null)},_=function(){var t,e=k.styles,e=e&&e.textAlign,i=S+T;t=l?0:v,u(p)&&d&&("center"===e||"right"===e)&&(i+={center:.5,right:1}[e]*(p-d.width)),i===C.x&&t===C.y||(C.attr("x",i),t!==O&&C.attr("y",t)),C.x=i,C.y=t},w=function(t,e){h?h.attr(t,e):L[t]=e},k.onAdd=function(){C.add(k),k.attr({text:t||0===t?t:"",x:e,y:i}),h&&u(o)&&k.attr({anchorX:o,anchorY:s})},k.widthSetter=function(t){p=t},k.heightSetter=function(t){f=t},k.paddingSetter=function(t){u(t)&&t!==T&&(T=k.padding=t,_())},k.paddingLeftSetter=function(t){u(t)&&t!==S&&(S=t,_())},k.alignSetter=function(t){t={left:0,center:.5,right:1}[t],t!==M&&(M=t,d&&k.attr({x:m}))},k.textSetter=function(t){t!==O&&C.textSetter(t),b(),_()},k["stroke-widthSetter"]=function(t,e){t&&(y=!0),D=t%2/2,w(e,t)},k.strokeSetter=k.fillSetter=k.rSetter=function(t,e){"fill"===e&&t&&(y=!0),w(e,t)},k.anchorXSetter=function(t,e){o=t,w(e,at(t)-D-m)},k.anchorYSetter=function(t,e){s=t,w(e,t-g)},k.xSetter=function(t){k.x=t,M&&(t-=M*((p||d.width)+2*T)),m=at(t),k.attr("translateX",m)},k.ySetter=function(t){g=k.y=at(t),k.attr("translateY",g)};var A=k.css;return Xt(k,{css:function(t){if(t){var e={},t=n(t);Ft(k.textProps,function(i){t[i]!==O&&(e[i]=t[i],delete t[i])}),C.css(e)}return A.call(k,t)},getBBox:function(){return{width:d.width+2*T,height:d.height+2*T,x:d.x-T,y:d.y-T}},shadow:function(t){return h&&h.shadow(t),k},destroy:function(){$t(k.element,"mouseenter"),$t(k.element,"mouseleave"),C&&(C=C.destroy()),h&&(h=h.destroy()),E.prototype.destroy.call(k),k=x=b=_=w=null}})}},j=ee,Xt(E.prototype,{htmlCss:function(t){var e=this.element;return(e=t&&"SPAN"===e.tagName&&t.width)&&(delete t.width,this.textWidth=e,this.updateTransform()),t&&"ellipsis"===t.textOverflow&&(t.whiteSpace="nowrap",t.overflow="hidden"),this.styles=Xt(this.styles,t),p(this.element,t),
this},htmlGetBBox:function(){var t=this.element;return"text"===t.nodeName&&(t.style.position="absolute"),{x:t.offsetLeft,y:t.offsetTop,width:t.offsetWidth,height:t.offsetHeight}},htmlUpdateTransform:function(){if(this.added){var t=this.renderer,e=this.element,i=this.translateX||0,n=this.translateY||0,o=this.x||0,s=this.y||0,a=this.textAlign||"left",l={left:0,center:.5,right:1}[a],c=this.shadows,h=this.styles;if(p(e,{marginLeft:i,marginTop:n}),c&&Ft(c,function(t){p(t,{marginLeft:i+1,marginTop:n+1})}),this.inverted&&Ft(e.childNodes,function(i){t.invertChild(i,e)}),"SPAN"===e.tagName){var c=this.rotation,d=r(this.textWidth),f=h&&h.whiteSpace,m=[c,a,e.innerHTML,this.textWidth,this.textAlign].join(",");m!==this.cTT&&(h=t.fontMetrics(e.style.fontSize).b,u(c)&&this.setSpanRotation(c,l,h),e.offsetWidth>d&&/[ \-]/.test(e.textContent||e.innerText)?(p(e,{width:d+"px",display:"block",whiteSpace:f||"normal"}),this.hasTextWidth=!0):this.hasTextWidth&&(p(e,{width:"",display:"",whiteSpace:f||"nowrap"}),this.hasTextWidth=!1),this.getSpanCorrection(this.hasTextWidth?d:e.offsetWidth,h,l,c,a)),p(e,{left:o+(this.xCorr||0)+"px",top:s+(this.yCorr||0)+"px"}),wt&&(h=e.offsetHeight),this.cTT=m}}else this.alignOnAdd=!0},setSpanRotation:function(t,e,i){var n={},r=bt?"-ms-transform":wt?"-webkit-transform":xt?"MozTransform":yt?"-o-transform":"";n[r]=n.transform="rotate("+t+"deg)",n[r+(xt?"Origin":"-origin")]=n.transformOrigin=100*e+"% "+i+"px",p(this.element,n)},getSpanCorrection:function(t,e,i){this.xCorr=-t*i,this.yCorr=-e}}),Xt(ee.prototype,{html:function(t,e,i){var n=this.createElement("span"),r=n.element,o=n.renderer,s=o.isSVG,a=function(t,e){Ft(["opacity","visibility"],function(i){Qt(t,i+"Setter",function(t,i,n,r){t.call(this,i,n,r),e[n]=i})})};return n.textSetter=function(t){t!==r.innerHTML&&delete this.bBox,r.innerHTML=this.textStr=t,n.htmlUpdateTransform()},s&&a(n,n.element.style),n.xSetter=n.ySetter=n.alignSetter=n.rotationSetter=function(t,e){"align"===e&&(e="textAlign"),n[e]=t,n.htmlUpdateTransform()},n.attr({text:t,x:at(e),y:at(i)}).css({position:"absolute",fontFamily:this.style.fontFamily,fontSize:this.style.fontSize}),r.style.whiteSpace="nowrap",n.css=n.htmlCss,s&&(n.add=function(t){var e,i=o.box.parentNode,s=[];if(this.parentGroup=t){if(e=t.div,!e){for(;t;)s.push(t),t=t.parentGroup;Ft(s.reverse(),function(t){var n,r=c(t.element,"class");r&&(r={className:r}),e=t.div=t.div||f(Pt,r,{position:"absolute",left:(t.translateX||0)+"px",top:(t.translateY||0)+"px",opacity:t.opacity},e||i),n=e.style,Xt(t,{translateXSetter:function(e,i){n.left=e+"px",t[i]=e,t.doTransform=!0},translateYSetter:function(e,i){n.top=e+"px",t[i]=e,t.doTransform=!0}}),a(t,n)})}}else e=i;return e.appendChild(r),n.added=!0,n.alignOnAdd&&n.htmlUpdateTransform(),n}),n}});var ie;if(!Mt&&!St){ie={init:function(t,e){var i=["<",e,' filled="f" stroked="f"'],n=["position: ","absolute",";"],r=e===Pt;("shape"===e||r)&&n.push("left:0;top:0;width:1px;height:1px;"),n.push("visibility: ",r?"hidden":"visible"),i.push(' style="',n.join(""),'"/>'),e&&(i=r||"span"===e||"img"===e?i.join(""):t.prepVML(i),this.element=f(i)),this.renderer=t},add:function(t){var e=this.renderer,i=this.element,n=e.box,r=t&&t.inverted,n=t?t.element||t:n;return t&&(this.parentGroup=t),r&&e.invertChild(i,n),n.appendChild(i),this.added=!0,this.alignOnAdd&&!this.deferUpdateTransform&&this.updateTransform(),this.onAdd&&this.onAdd(),this},updateTransform:E.prototype.htmlUpdateTransform,setSpanRotation:function(){var t=this.rotation,e=pt(t*gt),i=ft(t*gt);p(this.element,{filter:t?["progid:DXImageTransform.Microsoft.Matrix(M11=",e,", M12=",-i,", M21=",i,", M22=",e,", sizingMethod='auto expand')"].join(""):"none"})},getSpanCorrection:function(t,e,i,n,r){var o,s=n?pt(n*gt):1,a=n?ft(n*gt):0,l=Kt(this.elemHeight,this.element.offsetHeight);this.xCorr=s<0&&-t,this.yCorr=a<0&&-l,o=s*a<0,this.xCorr+=a*e*(o?1-i:i),this.yCorr-=s*e*(n?o?i:1-i:1),r&&"left"!==r&&(this.xCorr-=t*i*(s<0?-1:1),n&&(this.yCorr-=l*i*(a<0?-1:1)),p(this.element,{textAlign:r}))},pathToVML:function(t){for(var e=t.length,i=[];e--;)Jt(t[e])?i[e]=at(10*t[e])-5:"Z"===t[e]?i[e]="x":(i[e]=t[e],!t.isArc||"wa"!==t[e]&&"at"!==t[e]||(i[e+5]===i[e+7]&&(i[e+7]+=t[e+7]>t[e+5]?1:-1),i[e+6]===i[e+8]&&(i[e+8]+=t[e+8]>t[e+6]?1:-1)));return i.join(" ")||"x"},clip:function(t){var e,i=this;return t?(e=t.members,l(e,i),e.push(i),i.destroyClip=function(){l(e,i)},t=t.getCSS(i)):(i.destroyClip&&i.destroyClip(),t={clip:_t?"inherit":"rect(auto)"}),i.css(t)},css:E.prototype.htmlCss,safeRemoveChild:function(t){t.parentNode&&M(t)},destroy:function(){return this.destroyClip&&this.destroyClip(),E.prototype.destroy.apply(this)},on:function(e,i){return this.element["on"+e]=function(){var e=t.event;e.target=e.srcElement,i(e)},this},cutOffPath:function(t,e){var i,t=t.split(/[ ,]/);return i=t.length,9!==i&&11!==i||(t[i-4]=t[i-2]=r(t[i-2])-10*e),t.join(" ")},shadow:function(t,e,i){var n,o,s,a,l,u,c,h=[],d=this.element,p=this.renderer,m=d.style,g=d.path;if(g&&"string"!=typeof g.value&&(g="x"),l=g,t){for(u=Kt(t.width,3),c=(t.opacity||.15)/u,n=1;n<=3;n++)a=2*u+1-2*n,i&&(l=this.cutOffPath(g.value,a+.5)),s=['<shape isShadow="true" strokeweight="',a,'" filled="false" path="',l,'" coordsize="10 10" style="',d.style.cssText,'" />'],o=f(p.prepVML(s),null,{left:r(m.left)+Kt(t.offsetX,1),top:r(m.top)+Kt(t.offsetY,1)}),i&&(o.cutOff=a+1),s=['<stroke color="',t.color||"black",'" opacity="',c*n,'"/>'],f(p.prepVML(s),null,null,o),e?e.element.appendChild(o):d.parentNode.insertBefore(o,d),h.push(o);this.shadows=h}return this},updateShadows:At,setAttr:function(t,e){_t?this.element[t]=e:this.element.setAttribute(t,e)},classSetter:function(t){this.element.className=t},dashstyleSetter:function(t,e,i){(i.getElementsByTagName("stroke")[0]||f(this.renderer.prepVML(["<stroke/>"]),null,null,i))[e]=t||"solid",this[e]=t},dSetter:function(t,e,i){var n=this.shadows,t=t||[];if(this.d=t.join&&t.join(" "),i.path=t=this.pathToVML(t),n)for(i=n.length;i--;)n[i].path=n[i].cutOff?this.cutOffPath(t,n[i].cutOff):t;this.setAttr(e,t)},fillSetter:function(t,e,i){var n=i.nodeName;"SPAN"===n?i.style.color=t:"IMG"!==n&&(i.filled="none"!==t,this.setAttr("fillcolor",this.renderer.color(t,i,e,this)))},"fill-opacitySetter":function(t,e,i){f(this.renderer.prepVML(["<",e.split("-")[0],' opacity="',t,'"/>']),null,null,i)},opacitySetter:At,rotationSetter:function(t,e,i){i=i.style,this[e]=i[e]=t,i.left=-at(ft(t*gt)+1)+"px",i.top=at(pt(t*gt))+"px"},strokeSetter:function(t,e,i){this.setAttr("strokecolor",this.renderer.color(t,i,e,this))},"stroke-widthSetter":function(t,e,i){i.stroked=!!t,this[e]=t,Jt(t)&&(t+="px"),this.setAttr("strokeweight",t)},titleSetter:function(t,e){this.setAttr(e,t)},visibilitySetter:function(t,e,i){"inherit"===t&&(t="visible"),this.shadows&&Ft(this.shadows,function(i){i.style[e]=t}),"DIV"===i.nodeName&&(t="hidden"===t?"-999em":0,_t||(i.style[e]=t?"visible":"hidden"),e="top"),i.style[e]=t},xSetter:function(t,e,i){this[e]=t,"x"===e?e="left":"y"===e&&(e="top"),this.updateClipping?(this[e]=t,this.updateClipping()):i.style[e]=t},zIndexSetter:function(t,e,i){i.style[e]=t}},ie["stroke-opacitySetter"]=ie["fill-opacitySetter"],rt.VMLElement=ie=m(E,ie),ie.prototype.ySetter=ie.prototype.widthSetter=ie.prototype.heightSetter=ie.prototype.xSetter;var ne={Element:ie,isIE8:vt.indexOf("MSIE 8.0")>-1,init:function(t,e,i,n){var r;if(this.alignedObjects=[],n=this.createElement(Pt).css(Xt(this.getStyle(n),{position:"relative"})),r=n.element,t.appendChild(n.element),this.isVML=!0,this.box=r,this.boxWrapper=n,this.gradients={},this.cache={},this.cacheKeys=[],this.imgCount=0,this.setSize(e,i,!1),!ot.namespaces.hcv){ot.namespaces.add("hcv","urn:schemas-microsoft-com:vml");try{ot.createStyleSheet().cssText="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "}catch(t){ot.styleSheets[0].cssText+="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "}}},isHidden:function(){return!this.box.offsetWidth},clipRect:function(t,e,i,n){var r=this.createElement(),o=s(t);return Xt(r,{members:[],count:0,left:(o?t.x:t)+1,top:(o?t.y:e)+1,width:(o?t.width:i)-1,height:(o?t.height:n)-1,getCSS:function(t){var e=t.element,i=e.nodeName,t=t.inverted,n=this.top-("shape"===i?e.offsetTop:0),r=this.left,e=r+this.width,o=n+this.height,n={clip:"rect("+at(t?r:n)+"px,"+at(t?o:e)+"px,"+at(t?e:o)+"px,"+at(t?n:r)+"px)"};return!t&&_t&&"DIV"===i&&Xt(n,{width:e+"px",height:o+"px"}),n},updateClipping:function(){Ft(r.members,function(t){t.element&&t.css(r.getCSS(t))})}})},color:function(t,e,i,n){var r,o,s,a=this,l=/^rgba/,u="none";if(t&&t.linearGradient?s="gradient":t&&t.radialGradient&&(s="pattern"),s){var c,h,d,p,m,g,v,y,b=t.linearGradient||t.radialGradient,_="",t=t.stops,w=[],x=function(){o=['<fill colors="'+w.join(",")+'" opacity="',m,'" o:opacity2="',p,'" type="',s,'" ',_,'focus="100%" method="any" />'],f(a.prepVML(o),null,null,e)};if(d=t[0],y=t[t.length-1],d[0]>0&&t.unshift([0,d[1]]),y[0]<1&&t.push([1,y[1]]),Ft(t,function(t,e){l.test(t[1])?(r=A(t[1]),c=r.get("rgb"),h=r.get("a")):(c=t[1],h=1),w.push(100*t[0]+"% "+c),e?(m=h,g=c):(p=h,v=c)}),"fill"===i)if("gradient"===s)i=b.x1||b[0]||0,t=b.y1||b[1]||0,d=b.x2||b[2]||0,b=b.y2||b[3]||0,_='angle="'+(90-180*st.atan((b-t)/(d-i))/mt)+'"',x();else{var k,u=b.r,C=2*u,M=2*u,T=b.cx,S=b.cy,D=e.radialReference,u=function(){D&&(k=n.getBBox(),T+=(D[0]-k.x)/k.width-.5,S+=(D[1]-k.y)/k.height-.5,C*=D[2]/k.width,M*=D[2]/k.height),_='src="'+H.global.VMLRadialGradientURL+'" size="'+C+","+M+'" origin="0.5,0.5" position="'+T+","+S+'" color2="'+v+'" ',x()};n.added?u():n.onAdd=u,u=g}else u=c}else l.test(t)&&"IMG"!==e.tagName?(r=A(t),n[i+"-opacitySetter"](r.get("a"),i,e),u=r.get("rgb")):(u=e.getElementsByTagName(i),u.length&&(u[0].opacity=1,u[0].type="solid"),u=t);return u},prepVML:function(t){var e=this.isIE8,t=t.join("");return e?(t=t.replace("/>",' xmlns="urn:schemas-microsoft-com:vml" />'),t=t.indexOf('style="')===-1?t.replace("/>",' style="display:inline-block;behavior:url(#default#VML);" />'):t.replace('style="','style="display:inline-block;behavior:url(#default#VML);')):t=t.replace("<","<hcv:"),t},text:ee.prototype.html,path:function(t){var e={coordsize:"10 10"};return a(t)?e.d=t:s(t)&&Xt(e,t),this.createElement("shape").attr(e)},circle:function(t,e,i){var n=this.symbol("circle");return s(t)&&(i=t.r,e=t.y,t=t.x),n.isCircle=!0,n.r=i,n.attr({x:t,y:e})},g:function(t){var e;return t&&(e={className:"highcharts-"+t,"class":"highcharts-"+t}),this.createElement(Pt).attr(e)},image:function(t,e,i,n,r){var o=this.createElement("img").attr({src:t});return arguments.length>1&&o.attr({x:e,y:i,width:n,height:r}),o},createElement:function(t){return"rect"===t?this.symbol(t):ee.prototype.createElement.call(this,t)},invertChild:function(t,e){var i=this,n=e.style,o="IMG"===t.tagName&&t.style;p(t,{flip:"x",left:r(n.width)-(o?r(o.top):1),top:r(n.height)-(o?r(o.left):1),rotation:-90}),Ft(t.childNodes,function(e){i.invertChild(e,t)})},symbols:{arc:function(t,e,i,n,r){var o=r.start,s=r.end,a=r.r||i||n,i=r.innerR,n=pt(o),l=ft(o),u=pt(s),c=ft(s);return s-o===0?["x"]:(o=["wa",t-a,e-a,t+a,e+a,t+a*n,e+a*l,t+a*u,e+a*c],r.open&&!i&&o.push("e","M",t,e),o.push("at",t-i,e-i,t+i,e+i,t+i*u,e+i*c,t+i*n,e+i*l,"x","e"),o.isArc=!0,o)},circle:function(t,e,i,n,r){return r&&(i=n=2*r.r),r&&r.isCircle&&(t-=i/2,e-=n/2),["wa",t,e,t+i,e+n,t+i,e+n/2,t+i,e+n/2,"e"]},rect:function(t,e,i,n,r){return ee.prototype.symbols[u(r)&&r.r?"callout":"square"].call(0,t,e,i,n,r)}}};rt.VMLRenderer=ie=function(){this.init.apply(this,arguments)},ie.prototype=n(ee.prototype,ne),j=ie}ee.prototype.measureSpanWidth=function(t,e){var i,n=ot.createElement("span");return i=ot.createTextNode(t),n.appendChild(i),p(n,e),this.box.appendChild(n),i=n.offsetWidth,M(n),i};var re;St&&(rt.CanVGRenderer=ie=function(){Ct="http://www.w3.org/1999/xhtml"},ie.prototype.symbols={},re=function(){function t(){var t,i=e.length;for(t=0;t<i;t++)e[t]();e=[]}var e=[];return{push:function(i,n){if(0===e.length){var r=ot.getElementsByTagName("head")[0],o=ot.createElement("script");o.type="text/javascript",o.src=n,o.onload=t,r.appendChild(o)}e.push(i)}}}(),j=ie),I.prototype={addLabel:function(){var t,e=this.axis,i=e.options,r=e.chart,o=e.categories,s=e.names,a=this.pos,l=i.labels,c=e.tickPositions,h=a===c[0],d=a===c[c.length-1],s=o?Kt(o[a],s[a],a):a,o=this.label,c=c.info;e.isDatetimeAxis&&c&&(t=i.dateTimeLabelFormats[c.higherRanks[a]||c.unitName]),this.isFirst=h,this.isLast=d,i=e.labelFormatter.call({axis:e,chart:r,isFirst:h,isLast:d,dateTimeLabelFormat:t,value:e.isLog?T(e.lin2log(s)):s}),u(o)?o&&o.attr({text:i}):(this.labelLength=(this.label=o=u(i)&&l.enabled?r.renderer.text(i,0,0,l.useHTML).css(n(l.style)).add(e.labelGroup):null)&&o.getBBox().width,this.rotation=0)},getLabelSize:function(){return this.label?this.label.getBBox()[this.axis.horiz?"height":"width"]:0},handleOverflow:function(t){var e,i=this.axis,n=t.x,r=i.chart.chartWidth,o=i.chart.spacing,s=Kt(i.labelLeft,ht(i.pos,o[3])),o=Kt(i.labelRight,ct(i.pos+i.len,r-o[1])),a=this.label,l=this.rotation,u={left:0,center:.5,right:1}[i.labelAlign],c=a.getBBox().width,h=i.getSlotWidth(),d=h,p=1,f={};l?l<0&&n-u*c<s?e=at(n/pt(l*gt)-s):l>0&&n+u*c>o&&(e=at((r-n)/pt(l*gt))):(r=n+(1-u)*c,n-u*c<s?d=t.x+d*(1-u)-s:r>o&&(d=o-t.x+d*u,p=-1),d=ht(h,d),d<h&&"center"===i.labelAlign&&(t.x+=p*(h-d-u*(h-ht(c,d)))),(c>d||i.autoRotation&&a.styles.width)&&(e=d)),e&&(f.width=e,i.options.labels.style.textOverflow||(f.textOverflow="ellipsis"),a.css(f))},getPosition:function(t,e,i,n){var r=this.axis,o=r.chart,s=n&&o.oldChartHeight||o.chartHeight;return{x:t?r.translate(e+i,null,null,n)+r.transB:r.left+r.offset+(r.opposite?(n&&o.oldChartWidth||o.chartWidth)-r.right-r.left:0),y:t?s-r.bottom+r.offset-(r.opposite?r.height:0):s-r.translate(e+i,null,null,n)-r.transB}},getLabelPosition:function(t,e,i,n,r,o,s,a){var l=this.axis,c=l.transA,h=l.reversed,d=l.staggerLines,p=l.tickRotCorr||{x:0,y:0},f=r.y;return u(f)||(f=0===l.side?i.rotation?-8:-i.getBBox().height:2===l.side?p.y+8:pt(i.rotation*gt)*(p.y-i.getBBox(!1,0).height/2)),t=t+r.x+p.x-(o&&n?o*c*(h?-1:1):0),e=e+f-(o&&!n?o*c*(h?1:-1):0),d&&(i=s/(a||1)%d,l.opposite&&(i=d-i-1),e+=i*(l.labelOffset/d)),{x:t,y:at(e)}},getMarkPath:function(t,e,i,n,r,o){return o.crispLine(["M",t,e,"L",t+(r?0:-i),e+(r?i:0)],n)},render:function(t,e,i){var n=this.axis,r=n.options,o=n.chart.renderer,s=n.horiz,a=this.type,l=this.label,u=this.pos,c=r.labels,h=this.gridLine,d=a?a+"Grid":"grid",p=a?a+"Tick":"tick",f=r[d+"LineWidth"],m=r[d+"LineColor"],g=r[d+"LineDashStyle"],d=n.tickSize(p),p=r[p+"Color"],v=this.mark,y=c.step,b=!0,_=n.tickmarkOffset,w=this.getPosition(s,u,_,e),x=w.x,w=w.y,k=s&&x===n.pos+n.len||!s&&w===n.pos?-1:1,i=Kt(i,1);this.isActive=!0,f&&(u=n.getPlotLinePath(u+_,f*k,e,!0),h===O&&(h={stroke:m,"stroke-width":f},g&&(h.dashstyle=g),a||(h.zIndex=1),e&&(h.opacity=0),this.gridLine=h=f?o.path(u).attr(h).add(n.gridGroup):null),!e&&h&&u&&h[this.isNew?"attr":"animate"]({d:u,opacity:i})),d&&(n.opposite&&(d[0]=-d[0]),a=this.getMarkPath(x,w,d[0],d[1]*k,s,o),v?v.animate({d:a,opacity:i}):this.mark=o.path(a).attr({stroke:p,"stroke-width":d[1],opacity:i}).add(n.axisGroup)),l&&Jt(x)&&(l.xy=w=this.getLabelPosition(x,w,l,s,c,_,t,y),this.isFirst&&!this.isLast&&!Kt(r.showFirstLabel,1)||this.isLast&&!this.isFirst&&!Kt(r.showLastLabel,1)?b=!1:s&&!n.isRadial&&!c.step&&!c.rotation&&!e&&0!==i&&this.handleOverflow(w),y&&t%y&&(b=!1),b&&Jt(w.y)?(w.opacity=i,l[this.isNew?"attr":"animate"](w),this.isNew=!1):l.attr("y",-9999))},destroy:function(){C(this,this.axis)}},rt.PlotLineOrBand=function(t,e){this.axis=t,e&&(this.options=e,this.id=e.id)},rt.PlotLineOrBand.prototype={render:function(){var t,e=this,i=e.axis,r=i.horiz,o=e.options,s=o.label,a=e.label,l=o.width,c=o.to,h=o.from,d=u(h)&&u(c),p=o.value,f=o.dashStyle,m=e.svgElem,g=[],v=o.color,y=Kt(o.zIndex,0),b=o.events,_={},w=i.chart.renderer,g=i.log2lin;if(i.isLog&&(h=g(h),c=g(c),p=g(p)),l)g=i.getPlotLinePath(p,l),_={stroke:v,"stroke-width":l},f&&(_.dashstyle=f);else{if(!d)return;g=i.getPlotBandPath(h,c,o),v&&(_.fill=v),o.borderWidth&&(_.stroke=o.borderColor,_["stroke-width"]=o.borderWidth)}if(_.zIndex=y,m)g?(m.show(),m.animate({d:g})):(m.hide(),a&&(e.label=a=a.destroy()));else if(g&&g.length&&(e.svgElem=m=w.path(g).attr(_).add(),b))for(t in o=function(t){m.on(t,function(i){b[t].apply(e,[i])})},b)o(t);return s&&u(s.text)&&g&&g.length&&i.width>0&&i.height>0&&!g.flat?(s=n({align:r&&d&&"center",x:r?!d&&4:10,verticalAlign:!r&&d&&"middle",y:r?d?16:10:d?6:-4,rotation:r&&!d&&90},s),this.renderLabel(s,g,d,y)):a&&a.hide(),e},renderLabel:function(t,e,i,n){var r=this.label,o=this.axis.chart.renderer;r||(r={align:t.textAlign||t.align,rotation:t.rotation},r.zIndex=n,this.label=r=o.text(t.text,0,0,t.useHTML).attr(r).css(t.style).add()),n=[e[1],e[4],i?e[6]:e[1]],e=[e[2],e[5],i?e[7]:e[2]],i=x(n),o=x(e),r.align(t,!1,{x:i,y:o,width:k(n)-i,height:k(e)-o}),r.show()},destroy:function(){l(this.axis.plotLinesAndBands,this),delete this.axis,C(this)}};var oe=rt.Axis=function(){this.init.apply(this,arguments)};oe.prototype={defaultOptions:{dateTimeLabelFormats:{millisecond:"%H:%M:%S.%L",second:"%H:%M:%S",minute:"%H:%M",hour:"%H:%M",day:"%e. %b",week:"%e. %b",month:"%b '%y",year:"%Y"},endOnTick:!1,gridLineColor:"#D8D8D8",labels:{enabled:!0,style:{color:"#606060",cursor:"default",fontSize:"11px"},x:0},lineColor:"#C0D0E0",lineWidth:1,minPadding:.01,maxPadding:.01,minorGridLineColor:"#E0E0E0",minorGridLineWidth:1,minorTickColor:"#A0A0A0",minorTickLength:2,minorTickPosition:"outside",startOfWeek:1,startOnTick:!1,tickColor:"#C0D0E0",tickLength:10,tickmarkPlacement:"between",tickPixelInterval:100,tickPosition:"outside",title:{align:"middle",style:{color:"#707070"}},type:"linear"},defaultYAxisOptions:{endOnTick:!0,gridLineWidth:1,tickPixelInterval:72,showLastLabel:!0,labels:{x:-8},lineWidth:0,maxPadding:.05,minPadding:.05,startOnTick:!0,title:{rotation:270,text:"Values"},stackLabels:{enabled:!1,formatter:function(){return rt.numberFormat(this.total,-1)},style:n(Zt.line.dataLabels.style,{color:"#000000"})}},defaultLeftAxisOptions:{labels:{x:-15},title:{rotation:270}},defaultRightAxisOptions:{labels:{x:15},title:{rotation:90}},defaultBottomAxisOptions:{labels:{autoRotation:[-45],x:0},title:{rotation:0}},defaultTopAxisOptions:{labels:{autoRotation:[-45],x:0},title:{rotation:0}},init:function(t,e){var i=e.isX;this.chart=t,this.horiz=t.inverted?!i:i,this.coll=(this.isXAxis=i)?"xAxis":"yAxis",this.opposite=e.opposite,this.side=e.side||(this.horiz?this.opposite?0:2:this.opposite?1:3),this.setOptions(e);var n=this.options,r=n.type;this.labelFormatter=n.labels.formatter||this.defaultLabelFormatter,this.userOptions=e,this.minPixelPadding=0,this.reversed=n.reversed,this.visible=n.visible!==!1,this.zoomEnabled=n.zoomEnabled!==!1,this.categories=n.categories||"category"===r,this.names=this.names||[],this.isLog="logarithmic"===r,this.isDatetimeAxis="datetime"===r,this.isLinked=u(n.linkedTo),this.ticks={},this.labelEdge=[],this.minorTicks={},this.plotLinesAndBands=[],this.alternateBands={},this.len=0,this.minRange=this.userMinRange=n.minRange||n.maxZoom,this.range=n.range,this.offset=n.offset||0,this.stacks={},this.oldStacks={},this.stacksTouched=0,this.min=this.max=null,this.crosshair=Kt(n.crosshair,h(t.options.tooltip.crosshairs)[i?0:1],!1);var o,n=this.options.events;Ht(this,t.axes)===-1&&(i&&!this.isColorAxis?t.axes.splice(t.xAxis.length,0,this):t.axes.push(this),t[this.coll].push(this)),this.series=this.series||[],t.inverted&&i&&this.reversed===O&&(this.reversed=!0),this.removePlotLine=this.removePlotBand=this.removePlotBandOrLine;for(o in n)Bt(this,o,n[o]);this.isLog&&(this.val2lin=this.log2lin,this.lin2val=this.lin2log)},setOptions:function(t){this.options=n(this.defaultOptions,this.isXAxis?{}:this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],n(H[this.coll],t))},defaultLabelFormatter:function(){var t,e=this.axis,i=this.value,n=e.categories,r=this.dateTimeLabelFormat,o=H.lang.numericSymbols,s=o&&o.length,a=e.options.labels.format,e=e.isLog?i:e.tickInterval;if(a)t=y(a,this);else if(n)t=i;else if(r)t=F(r,i);else if(s&&e>=1e3)for(;s--&&t===O;)n=Math.pow(1e3,s+1),e>=n&&10*i%n===0&&null!==o[s]&&(t=rt.numberFormat(i/n,-1)+o[s]);return t===O&&(t=dt(i)>=1e4?rt.numberFormat(i,-1):rt.numberFormat(i,-1,O,"")),t},getSeriesExtremes:function(){var t=this,e=t.chart;t.hasVisibleSeries=!1,t.dataMin=t.dataMax=t.threshold=null,t.softThreshold=!t.isXAxis,t.buildStacks&&t.buildStacks(),Ft(t.series,function(i){if(i.visible||!e.options.chart.ignoreHiddenSeries){var n,r=i.options,o=r.threshold;t.hasVisibleSeries=!0,t.isLog&&o<=0&&(o=null),t.isXAxis?(r=i.xData,r.length&&(i=x(r),!Jt(i)&&!(i instanceof W)&&(r=Rt(r,function(t){return Jt(t)}),i=x(r)),t.dataMin=ht(Kt(t.dataMin,r[0]),i),t.dataMax=ct(Kt(t.dataMax,r[0]),k(r)))):(i.getExtremes(),n=i.dataMax,i=i.dataMin,u(i)&&u(n)&&(t.dataMin=ht(Kt(t.dataMin,i),i),t.dataMax=ct(Kt(t.dataMax,n),n)),u(o)&&(t.threshold=o),r.softThreshold&&!t.isLog||(t.softThreshold=!1))}})},translate:function(t,e,i,n,r,o){var s=this.linkedParent||this,a=1,l=0,u=n?s.oldTransA:s.transA,n=n?s.oldMin:s.min,c=s.minPixelPadding,r=(s.isOrdinal||s.isBroken||s.isLog&&r)&&s.lin2val;return u||(u=s.transA),i&&(a*=-1,l=s.len),s.reversed&&(a*=-1,l-=a*(s.sector||s.len)),e?(t=t*a+l,t-=c,t=t/u+n,r&&(t=s.lin2val(t))):(r&&(t=s.val2lin(t)),"between"===o&&(o=.5),t=a*(t-n)*u+l+a*c+(Jt(o)?u*o*s.pointRange:0)),t},toPixels:function(t,e){return this.translate(t,!1,!this.horiz,null,!0)+(e?0:this.pos)},toValue:function(t,e){return this.translate(t-(e?0:this.pos),!0,!this.horiz,null,!0)},getPlotLinePath:function(t,e,i,n,r){var o,s,a,l=this.chart,u=this.left,c=this.top,h=i&&l.oldChartHeight||l.chartHeight,d=i&&l.oldChartWidth||l.chartWidth;o=this.transB;var p=function(t,e,i){return(t<e||t>i)&&(n?t=ht(ct(e,t),i):a=!0),t},r=Kt(r,this.translate(t,null,null,i)),t=i=at(r+o);return o=s=at(h-r-o),Jt(r)?this.horiz?(o=c,s=h-this.bottom,t=i=p(t,u,u+this.width)):(t=u,i=d-this.right,o=s=p(o,c,c+this.height)):a=!0,a&&!n?null:l.renderer.crispLine(["M",t,o,"L",i,s],e||1)},getLinearTickPositions:function(t,e,i){var n,r=T(lt(e/t)*t),o=T(ut(i/t)*t),s=[];if(e===i&&Jt(e))return[e];for(e=r;e<=o&&(s.push(e),e=T(e+t),e!==n);)n=e;return s},getMinorTickPositions:function(){var t,e=this.options,i=this.tickPositions,n=this.minorTickInterval,r=[],o=this.pointRangePadding||0;t=this.min-o;var o=this.max+o,s=o-t;if(s&&s/n<this.len/3)if(this.isLog)for(o=i.length,t=1;t<o;t++)r=r.concat(this.getLogTickPositions(n,i[t-1],i[t],!0));else if(this.isDatetimeAxis&&"auto"===e.minorTickInterval)r=r.concat(this.getTimeTicks(this.normalizeTimeTickInterval(n),t,o,e.startOfWeek));else for(i=t+(i[0]-t)%n;i<=o;i+=n)r.push(i);return 0!==r.length&&this.trimTicks(r,e.startOnTick,e.endOnTick),r},adjustForMinRange:function(){var t,e,i,n,r,o,s,a=this.options,l=this.min,c=this.max,h=this.dataMax-this.dataMin>=this.minRange;this.isXAxis&&this.minRange===O&&!this.isLog&&(u(a.min)||u(a.max)?this.minRange=null:(Ft(this.series,function(t){for(r=t.xData,i=o=t.xIncrement?1:r.length-1;i>0;i--)n=r[i]-r[i-1],(e===O||n<e)&&(e=n)}),this.minRange=ht(5*e,this.dataMax-this.dataMin))),c-l<this.minRange&&(s=this.minRange,t=(s-c+l)/2,t=[l-t,Kt(a.min,l-t)],h&&(t[2]=this.dataMin),l=k(t),c=[l+s,Kt(a.max,l+s)],h&&(c[2]=this.dataMax),c=x(c),c-l<s&&(t[0]=c-s,t[1]=Kt(a.min,c-s),l=k(t))),this.min=l,this.max=c},getClosest:function(){var t;return Ft(this.series,function(e){var i=e.closestPointRange;!e.noSharedTooltip&&u(i)&&(t=u(t)?ht(t,i):i)}),t},setAxisTranslation:function(t){var e,i=this,n=i.max-i.min,r=i.axisPointRange||0,s=0,a=0,l=i.linkedParent,u=!!i.categories,c=i.transA,h=i.isXAxis;(h||u||r)&&(l?(s=l.minPointOffset,a=l.pointRangePadding):(e=i.getClosest(),Ft(i.series,function(t){var n=u?1:h?Kt(t.options.pointRange,e,0):i.axisPointRange||0,t=t.options.pointPlacement;r=ct(r,n),i.single||(s=ct(s,o(t)?0:n/2),a=ct(a,"on"===t?0:n))})),l=i.ordinalSlope&&e?i.ordinalSlope/e:1,i.minPointOffset=s*=l,i.pointRangePadding=a*=l,i.pointRange=ht(r,n),h&&(i.closestPointRange=e)),t&&(i.oldTransA=c),i.translationSlope=i.transA=c=i.len/(n+a||1),i.transB=i.horiz?i.left:i.bottom,i.minPixelPadding=c*s},minFromRange:function(){return this.max-this.range},setTickInterval:function(t){var i,n,r,o,s=this,a=s.chart,l=s.options,c=s.isLog,h=s.log2lin,d=s.isDatetimeAxis,p=s.isXAxis,f=s.isLinked,m=l.maxPadding,g=l.minPadding,v=l.tickInterval,y=l.tickPixelInterval,w=s.categories,x=s.threshold,k=s.softThreshold;!d&&!w&&!f&&this.getTickAmount(),r=Kt(s.userMin,l.min),o=Kt(s.userMax,l.max),f?(s.linkedParent=a[s.coll][l.linkedTo],a=s.linkedParent.getExtremes(),s.min=Kt(a.min,a.dataMin),s.max=Kt(a.max,a.dataMax),l.type!==s.linkedParent.options.type&&e(11,1)):(!k&&u(x)&&(s.dataMin>=x?(i=x,g=0):s.dataMax<=x&&(n=x,m=0)),s.min=Kt(r,i,s.dataMin),s.max=Kt(o,n,s.dataMax)),c&&(!t&&ht(s.min,Kt(s.dataMin,s.min))<=0&&e(10,1),s.min=T(h(s.min),15),s.max=T(h(s.max),15)),s.range&&u(s.max)&&(s.userMin=s.min=r=ct(s.min,s.minFromRange()),s.userMax=o=s.max,s.range=null),qt(s,"foundExtremes"),s.beforePadding&&s.beforePadding(),s.adjustForMinRange(),w||s.axisPointRange||s.usePercentage||f||!u(s.min)||!u(s.max)||!(h=s.max-s.min)||(!u(r)&&g&&(s.min-=h*g),!u(o)&&m&&(s.max+=h*m)),Jt(l.floor)&&(s.min=ct(s.min,l.floor)),Jt(l.ceiling)&&(s.max=ht(s.max,l.ceiling)),k&&u(s.dataMin)&&(x=x||0,!u(r)&&s.min<x&&s.dataMin>=x?s.min=x:!u(o)&&s.max>x&&s.dataMax<=x&&(s.max=x)),s.tickInterval=s.min===s.max||void 0===s.min||void 0===s.max?1:f&&!v&&y===s.linkedParent.options.tickPixelInterval?v=s.linkedParent.tickInterval:Kt(v,this.tickAmount?(s.max-s.min)/ct(this.tickAmount-1,1):void 0,w?1:(s.max-s.min)*y/ct(s.len,y)),p&&!t&&Ft(s.series,function(t){t.processData(s.min!==s.oldMin||s.max!==s.oldMax)}),s.setAxisTranslation(!0),s.beforeSetTickPositions&&s.beforeSetTickPositions(),s.postProcessTickInterval&&(s.tickInterval=s.postProcessTickInterval(s.tickInterval)),s.pointRange&&!v&&(s.tickInterval=ct(s.pointRange,s.tickInterval)),t=Kt(l.minTickInterval,s.isDatetimeAxis&&s.closestPointRange),!v&&s.tickInterval<t&&(s.tickInterval=t),d||c||v||(s.tickInterval=_(s.tickInterval,null,b(s.tickInterval),Kt(l.allowDecimals,!(s.tickInterval>.5&&s.tickInterval<5&&s.max>1e3&&s.max<9999)),!!this.tickAmount)),!this.tickAmount&&this.len&&(s.tickInterval=s.unsquish()),this.setTickPositions()},setTickPositions:function(){var t,e,i=this.options,n=i.tickPositions,r=i.tickPositioner,o=i.startOnTick,s=i.endOnTick;this.tickmarkOffset=this.categories&&"between"===i.tickmarkPlacement&&1===this.tickInterval?.5:0,this.minorTickInterval="auto"===i.minorTickInterval&&this.tickInterval?this.tickInterval/5:i.minorTickInterval,this.tickPositions=t=n&&n.slice(),!t&&(t=this.isDatetimeAxis?this.getTimeTicks(this.normalizeTimeTickInterval(this.tickInterval,i.units),this.min,this.max,i.startOfWeek,this.ordinalPositions,this.closestPointRange,!0):this.isLog?this.getLogTickPositions(this.tickInterval,this.min,this.max):this.getLinearTickPositions(this.tickInterval,this.min,this.max),t.length>this.len&&(t=[t[0],t.pop()]),this.tickPositions=t,r&&(r=r.apply(this,[this.min,this.max])))&&(this.tickPositions=t=r),this.isLinked||(this.trimTicks(t,o,s),this.min===this.max&&u(this.min)&&!this.tickAmount&&(e=!0,this.min-=.5,this.max+=.5),this.single=e,!n&&!r&&this.adjustTickAmount())},trimTicks:function(t,e,i){var n=t[0],r=t[t.length-1],o=this.minPointOffset||0;if(e)this.min=n;else for(;this.min-o>t[0];)t.shift();if(i)this.max=r;else for(;this.max+o<t[t.length-1];)t.pop();0===t.length&&u(n)&&t.push((r+n)/2)},alignToOthers:function(){var t,e={},i=this.options;return this.chart.options.chart.alignTicks!==!1&&i.alignTicks!==!1&&Ft(this.chart[this.coll],function(i){var n=i.options,n=[i.horiz?n.left:n.top,n.width,n.height,n.pane].join(",");i.series.length&&(e[n]?t=!0:e[n]=1)}),t},getTickAmount:function(){var t=this.options,e=t.tickAmount,i=t.tickPixelInterval;!u(t.tickInterval)&&this.len<i&&!this.isRadial&&!this.isLog&&t.startOnTick&&t.endOnTick&&(e=2),!e&&this.alignToOthers()&&(e=ut(this.len/i)+1),e<4&&(this.finalTickAmt=e,e=5),this.tickAmount=e},adjustTickAmount:function(){var t=this.tickInterval,e=this.tickPositions,i=this.tickAmount,n=this.finalTickAmt,r=e&&e.length;if(r<i){for(;e.length<i;)e.push(T(e[e.length-1]+t));this.transA*=(r-1)/(i-1),this.max=e[e.length-1]}else r>i&&(this.tickInterval*=2,this.setTickPositions());if(u(n)){for(t=i=e.length;t--;)(3===n&&t%2===1||n<=2&&t>0&&t<i-1)&&e.splice(t,1);this.finalTickAmt=O}},setScale:function(){var t,e;this.oldMin=this.min,this.oldMax=this.max,this.oldAxisLength=this.len,this.setAxisSize(),e=this.len!==this.oldAxisLength,Ft(this.series,function(e){(e.isDirtyData||e.isDirty||e.xAxis.isDirty)&&(t=!0)}),e||t||this.isLinked||this.forceRedraw||this.userMin!==this.oldUserMin||this.userMax!==this.oldUserMax||this.alignToOthers()?(this.resetStacks&&this.resetStacks(),this.forceRedraw=!1,this.getSeriesExtremes(),this.setTickInterval(),this.oldUserMin=this.userMin,this.oldUserMax=this.userMax,this.isDirty||(this.isDirty=e||this.min!==this.oldMin||this.max!==this.oldMax)):this.cleanStacks&&this.cleanStacks()},setExtremes:function(t,e,i,n,r){var o=this,s=o.chart,i=Kt(i,!0);Ft(o.series,function(t){delete t.kdTree}),r=Xt(r,{min:t,max:e}),qt(o,"setExtremes",r,function(){o.userMin=t,o.userMax=e,o.eventArgs=r,i&&s.redraw(n)})},zoom:function(t,e){var i=this.dataMin,n=this.dataMax,r=this.options,o=ht(i,Kt(r.min,i)),r=ct(n,Kt(r.max,n));return this.allowZoomOutside||(u(i)&&t<=o&&(t=o),u(n)&&e>=r&&(e=r)),this.displayBtn=t!==O||e!==O,this.setExtremes(t,e,!1,O,{trigger:"zoom"}),!0},setAxisSize:function(){var t=this.chart,e=this.options,i=e.offsetLeft||0,n=this.horiz,r=Kt(e.width,t.plotWidth-i+(e.offsetRight||0)),o=Kt(e.height,t.plotHeight),s=Kt(e.top,t.plotTop),e=Kt(e.left,t.plotLeft+i),i=/%$/;i.test(o)&&(o=Math.round(parseFloat(o)/100*t.plotHeight)),i.test(s)&&(s=Math.round(parseFloat(s)/100*t.plotHeight+t.plotTop)),this.left=e,this.top=s,this.width=r,this.height=o,this.bottom=t.chartHeight-o-s,this.right=t.chartWidth-r-e,this.len=ct(n?r:o,0),this.pos=n?e:s},getExtremes:function(){var t=this.isLog,e=this.lin2log;return{min:t?T(e(this.min)):this.min,max:t?T(e(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},getThreshold:function(t){var e=this.isLog,i=this.lin2log,n=e?i(this.min):this.min,e=e?i(this.max):this.max;return null===t?t=e<0?e:n:n>t?t=n:e<t&&(t=e),this.translate(t,0,1,0,1)},autoLabelAlign:function(t){return t=(Kt(t,0)-90*this.side+720)%360,t>15&&t<165?"right":t>195&&t<345?"left":"center"},tickSize:function(t){var e=this.options,i=e[t+"Length"],n=Kt(e[t+"Width"],"tick"===t&&this.isXAxis?1:0);if(n&&i)return"inside"===e[t+"Position"]&&(i=-i),[i,n]},labelMetrics:function(){return this.chart.renderer.fontMetrics(this.options.labels.style.fontSize,this.ticks[0]&&this.ticks[0].label)},unsquish:function(){var t,e,i,n=this.options.labels,r=this.horiz,o=this.tickInterval,s=o,a=this.len/(((this.categories?1:0)+this.max-this.min)/o),l=n.rotation,c=this.labelMetrics(),h=Number.MAX_VALUE,d=function(t){return t/=a||1,t=t>1?ut(t):1,t*o};return r?(i=!n.staggerLines&&!n.step&&(u(l)?[l]:a<Kt(n.autoRotationLimit,80)&&n.autoRotation))&&Ft(i,function(i){var n;(i===l||i&&i>=-90&&i<=90)&&(e=d(dt(c.h/ft(gt*i))),n=e+dt(i/360),n<h&&(h=n,t=i,s=e))}):n.step||(s=d(c.h)),this.autoRotation=i,this.labelRotation=Kt(t,l),s},getSlotWidth:function(){var t=this.chart,e=this.horiz,i=this.options.labels,n=Math.max(this.tickPositions.length-(this.categories?0:1),1),r=t.margin[3];return e&&(i.step||0)<2&&!i.rotation&&(this.staggerLines||1)*t.plotWidth/n||!e&&(r&&r-t.spacing[3]||.33*t.chartWidth)},renderUnsquish:function(){var t,e,i,r=this.chart,s=r.renderer,a=this.tickPositions,l=this.ticks,u=this.options.labels,c=this.horiz,h=this.getSlotWidth(),d=ct(1,at(h-2*(u.padding||5))),p={},f=this.labelMetrics(),m=u.style.textOverflow,g=0;if(o(u.rotation)||(p.rotation=u.rotation||0),this.autoRotation)Ft(a,function(t){(t=l[t])&&t.labelLength>g&&(g=t.labelLength)}),g>d&&g>f.h?p.rotation=this.labelRotation:this.labelRotation=0;else if(h&&(t={width:d+"px"},!m))for(t.textOverflow="clip",e=a.length;!c&&e--;)i=a[e],(d=l[i].label)&&("ellipsis"===d.styles.textOverflow?d.css({textOverflow:"clip"}):l[i].labelLength>h&&d.css({width:h+"px"}),d.getBBox().height>this.len/a.length-(f.h-f.f)&&(d.specCss={textOverflow:"ellipsis"}));p.rotation&&(t={width:(g>.5*r.chartHeight?.33*r.chartHeight:r.chartHeight)+"px"},!m)&&(t.textOverflow="ellipsis"),(this.labelAlign=u.align||this.autoLabelAlign(this.labelRotation))&&(p.align=this.labelAlign),Ft(a,function(e){var i=(e=l[e])&&e.label;i&&(i.attr(p),t&&i.css(n(t,i.specCss)),delete i.specCss,e.rotation=p.rotation)}),this.tickRotCorr=s.rotCorr(f.b,this.labelRotation||0,0!==this.side);
},hasData:function(){return this.hasVisibleSeries||u(this.min)&&u(this.max)&&!!this.tickPositions},getOffset:function(){var t,e,i,n,r=this,o=r.chart,s=o.renderer,a=r.options,l=r.tickPositions,c=r.ticks,h=r.horiz,d=r.side,p=o.inverted?[1,0,3,2][d]:d,f=0,m=0,g=a.title,v=a.labels,y=0,b=r.opposite,_=o.axisOffset,o=o.clipOffset,w=[-1,1,1,-1][d],x=r.axisParent,k=this.tickSize("tick");if(t=r.hasData(),r.showAxis=e=t||Kt(a.showEmpty,!0),r.staggerLines=r.horiz&&v.staggerLines,r.axisGroup||(r.gridGroup=s.g("grid").attr({zIndex:a.gridZIndex||1}).add(x),r.axisGroup=s.g("axis").attr({zIndex:a.zIndex||2}).add(x),r.labelGroup=s.g("axis-labels").attr({zIndex:v.zIndex||7}).addClass("highcharts-"+r.coll.toLowerCase()+"-labels").add(x)),t||r.isLinked)Ft(l,function(t){c[t]?c[t].addLabel():c[t]=new I(r,t)}),r.renderUnsquish(),v.reserveSpace!==!1&&(0===d||2===d||{1:"left",3:"right"}[d]===r.labelAlign||"center"===r.labelAlign)&&Ft(l,function(t){y=ct(c[t].getLabelSize(),y)}),r.staggerLines&&(y*=r.staggerLines,r.labelOffset=y*(r.opposite?-1:1));else for(n in c)c[n].destroy(),delete c[n];g&&g.text&&g.enabled!==!1&&(r.axisTitle||((n=g.textAlign)||(n=(h?{low:"left",middle:"center",high:"right"}:{low:b?"right":"left",middle:"center",high:b?"left":"right"})[g.align]),r.axisTitle=s.text(g.text,0,0,g.useHTML).attr({zIndex:7,rotation:g.rotation||0,align:n}).addClass("highcharts-"+this.coll.toLowerCase()+"-title").css(g.style).add(r.axisGroup),r.axisTitle.isNew=!0),e&&(f=r.axisTitle.getBBox()[h?"height":"width"],i=g.offset,m=u(i)?0:Kt(g.margin,h?5:10)),r.axisTitle[e?"show":"hide"](!0)),r.offset=w*Kt(a.offset,_[d]),r.tickRotCorr=r.tickRotCorr||{x:0,y:0},s=0===d?-r.labelMetrics().h:2===d?r.tickRotCorr.y:0,m=Math.abs(y)+m,y&&(m-=s,m+=w*(h?Kt(v.y,r.tickRotCorr.y+8*w):v.x)),r.axisTitleMargin=Kt(i,m),_[d]=ct(_[d],r.axisTitleMargin+f+w*r.offset,m,t&&l.length&&k?k[0]:0),a=a.offset?0:2*lt(a.lineWidth/2),o[p]=ct(o[p],a)},getLinePath:function(t){var e=this.chart,i=this.opposite,n=this.offset,r=this.horiz,o=this.left+(i?this.width:0)+n,n=e.chartHeight-this.bottom-(i?this.height:0)+n;return i&&(t*=-1),e.renderer.crispLine(["M",r?this.left:o,r?n:this.top,"L",r?e.chartWidth-this.right:o,r?n:e.chartHeight-this.bottom],t)},getTitlePosition:function(){var t=this.horiz,e=this.left,i=this.top,n=this.len,o=this.options.title,s=t?e:i,a=this.opposite,l=this.offset,u=o.x||0,c=o.y||0,h=r(o.style.fontSize||12),n={low:s+(t?0:n),middle:s+n/2,high:s+(t?n:0)}[o.align],e=(t?i+this.height:e)+(t?1:-1)*(a?-1:1)*this.axisTitleMargin+(2===this.side?h:0);return{x:t?n+u:e+(a?this.width:0)+l+u,y:t?e+c-(a?this.height:0)+l:n+c}},render:function(){var t,e,i,n=this,r=n.chart,o=r.renderer,s=n.options,a=n.isLog,l=n.lin2log,u=n.isLinked,c=n.tickPositions,h=n.axisTitle,p=n.ticks,f=n.minorTicks,m=n.alternateBands,g=s.stackLabels,v=s.alternateGridColor,y=n.tickmarkOffset,b=s.lineWidth,_=r.hasRendered&&Jt(n.oldMin),w=n.showAxis,x=D(o.globalAnimation);n.labelEdge.length=0,n.overlap=!1,Ft([p,f,m],function(t){for(var e in t)t[e].isActive=!1}),(n.hasData()||u)&&(n.minorTickInterval&&!n.categories&&Ft(n.getMinorTickPositions(),function(t){f[t]||(f[t]=new I(n,t,"minor")),_&&f[t].isNew&&f[t].render(null,!0),f[t].render(null,!1,1)}),c.length&&(Ft(c,function(t,e){(!u||t>=n.min&&t<=n.max)&&(p[t]||(p[t]=new I(n,t)),_&&p[t].isNew&&p[t].render(e,!0,.1),p[t].render(e))}),y&&(0===n.min||n.single))&&(p[-1]||(p[-1]=new I(n,-1,null,!0)),p[-1].render(-1)),v&&Ft(c,function(t,o){i=c[o+1]!==O?c[o+1]+y:n.max-y,o%2===0&&t<n.max&&i<=n.max+(r.polar?-y:y)&&(m[t]||(m[t]=new rt.PlotLineOrBand(n)),e=t+y,m[t].options={from:a?l(e):e,to:a?l(i):i,color:v},m[t].render(),m[t].isActive=!0)}),n._addedPlotLB||(Ft((s.plotLines||[]).concat(s.plotBands||[]),function(t){n.addPlotBandOrLine(t)}),n._addedPlotLB=!0)),Ft([p,f,m],function(t){var e,i,n=[],o=x.duration;for(e in t)t[e].isActive||(t[e].render(e,!1,0),t[e].isActive=!1,n.push(e));d(function(){for(i=n.length;i--;)t[n[i]]&&!t[n[i]].isActive&&(t[n[i]].destroy(),delete t[n[i]])},t!==m&&r.hasRendered&&o?o:0)}),b&&(t=n.getLinePath(b),n.axisLine?n.axisLine.animate({d:t}):n.axisLine=o.path(t).attr({stroke:s.lineColor,"stroke-width":b,zIndex:7}).add(n.axisGroup),n.axisLine[w?"show":"hide"](!0)),h&&w&&(h[h.isNew?"attr":"animate"](n.getTitlePosition()),h.isNew=!1),g&&g.enabled&&n.renderStackTotals(),n.isDirty=!1},redraw:function(){this.visible&&(this.render(),Ft(this.plotLinesAndBands,function(t){t.render()})),Ft(this.series,function(t){t.isDirty=!0})},destroy:function(t){var e,i=this,n=i.stacks,r=i.plotLinesAndBands;t||$t(i);for(e in n)C(n[e]),n[e]=null;for(Ft([i.ticks,i.minorTicks,i.alternateBands],function(t){C(t)}),t=r.length;t--;)r[t].destroy();Ft("stackTotalGroup,axisLine,axisTitle,axisGroup,cross,gridGroup,labelGroup".split(","),function(t){i[t]&&(i[t]=i[t].destroy())}),this.cross&&this.cross.destroy()},drawCrosshair:function(t,e){var i,n,r,o=this.crosshair;this.crosshair&&(u(e)||!Kt(o.snap,!0))!==!1?(Kt(o.snap,!0)?u(e)&&(i=this.isXAxis?e.plotX:this.len-e.plotY):i=this.horiz?t.chartX-this.pos:this.len-t.chartY+this.pos,i=this.isRadial?this.getPlotLinePath(this.isXAxis?e.x:Kt(e.stackY,e.y))||null:this.getPlotLinePath(null,null,null,null,i)||null,null===i?this.hideCrosshair():(n=this.categories&&!this.isRadial,r=Kt(o.width,n?this.transA:1),this.cross?this.cross.attr({d:i,visibility:"visible","stroke-width":r}):(n={"pointer-events":"none","stroke-width":r,stroke:o.color||(n?"rgba(155,200,255,0.2)":"#C0C0C0"),zIndex:Kt(o.zIndex,2)},o.dashStyle&&(n.dashstyle=o.dashStyle),this.cross=this.chart.renderer.path(i).attr(n).add()))):this.hideCrosshair()},hideCrosshair:function(){this.cross&&this.cross.hide()}},Xt(oe.prototype,{getPlotBandPath:function(t,e){var i=this.getPlotLinePath(e,null,null,!0),n=this.getPlotLinePath(t,null,null,!0);return n&&i?(n.flat=n.toString()===i.toString(),n.push(i[4],i[5],i[1],i[2])):n=null,n},addPlotBand:function(t){return this.addPlotBandOrLine(t,"plotBands")},addPlotLine:function(t){return this.addPlotBandOrLine(t,"plotLines")},addPlotBandOrLine:function(t,e){var i=new rt.PlotLineOrBand(this,t).render(),n=this.userOptions;return i&&(e&&(n[e]=n[e]||[],n[e].push(t)),this.plotLinesAndBands.push(i)),i},removePlotBandOrLine:function(t){for(var e=this.plotLinesAndBands,i=this.options,n=this.userOptions,r=e.length;r--;)e[r].id===t&&e[r].destroy();Ft([i.plotLines||[],n.plotLines||[],i.plotBands||[],n.plotBands||[]],function(e){for(r=e.length;r--;)e[r].id===t&&l(e,e[r])})}}),oe.prototype.getTimeTicks=function(t,e,i,n){var r,o=[],s={},a=H.global.useUTC,l=new W(e-v(e)),c=t.unitRange,h=t.count;if(u(e)){l[K](c>=R.second?0:h*lt(l.getMilliseconds()/h)),c>=R.second&&l[Q](c>=R.minute?0:h*lt(l.getSeconds()/h)),c>=R.minute&&l[Z](c>=R.hour?0:h*lt(l[q]()/h)),c>=R.hour&&l[tt](c>=R.day?0:h*lt(l[U]()/h)),c>=R.day&&l[et](c>=R.month?1:h*lt(l[G]()/h)),c>=R.month&&(l[it](c>=R.year?0:h*lt(l[X]()/h)),r=l[J]()),c>=R.year&&(r-=r%h,l[nt](r)),c===R.week&&l[et](l[G]()-l[V]()+Kt(n,1)),e=1,(B||$)&&(l=l.getTime(),l=new W(l+v(l))),r=l[J]();for(var n=l.getTime(),d=l[X](),p=l[G](),f=!a||!!$,m=(R.day+(a?v(l):6e4*l.getTimezoneOffset()))%R.day;n<i;)o.push(n),c===R.year?n=z(r+e*h,0):c===R.month?n=z(r,d+e*h):!f||c!==R.day&&c!==R.week?n+=c*h:n=z(r,d,p+e*h*(c===R.day?1:7)),e++;o.push(n),Ft(Rt(o,function(t){return c<=R.hour&&t%R.day===m}),function(t){s[t]="day"})}return o.info=Xt(t,{higherRanks:s,totalRange:c*h}),o},oe.prototype.normalizeTimeTickInterval=function(t,e){var i,n=e||[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1,2]],["week",[1,2]],["month",[1,2,3,4,6]],["year",null]],r=n[n.length-1],o=R[r[0]],s=r[1];for(i=0;i<n.length&&(r=n[i],o=R[r[0]],s=r[1],!(n[i+1]&&t<=(o*s[s.length-1]+R[n[i+1][0]])/2));i++);return o===R.year&&t<5*o&&(s=[1,2,5]),n=_(t/o,s,"year"===r[0]?ct(b(t/o),1):1),{unitRange:o,count:n,unitName:r[0]}},oe.prototype.getLogTickPositions=function(t,e,i,n){var r=this.options,o=this.len,s=this.lin2log,a=this.log2lin,l=[];if(n||(this._minorAutoInterval=null),t>=.5)t=at(t),l=this.getLinearTickPositions(t,e,i);else if(t>=.08)for(var u,c,h,d,p,o=lt(e),r=t>.3?[1,2,4]:t>.15?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];o<i+1&&!p;o++)for(c=r.length,u=0;u<c&&!p;u++)h=a(s(o)*r[u]),h>e&&(!n||d<=i)&&d!==O&&l.push(d),d>i&&(p=!0),d=h;else e=s(e),i=s(i),t=r[n?"minorTickInterval":"tickInterval"],t=Kt("auto"===t?null:t,this._minorAutoInterval,(i-e)*(r.tickPixelInterval/(n?5:1))/((n?o/this.tickPositions.length:o)||1)),t=_(t,null,b(t)),l=zt(this.getLinearTickPositions(t,e,i),a),n||(this._minorAutoInterval=t/5);return n||(this.tickInterval=t),l},oe.prototype.log2lin=function(t){return st.log(t)/st.LN10},oe.prototype.lin2log=function(t){return st.pow(10,t)};var se=rt.Tooltip=function(){this.init.apply(this,arguments)};se.prototype={init:function(t,e){var i=e.borderWidth,n=e.style,o=r(n.padding);this.chart=t,this.options=e,this.crosshairs=[],this.now={x:0,y:0},this.isHidden=!0,this.label=t.renderer.label("",0,0,e.shape||"callout",null,null,e.useHTML,null,"tooltip").attr({padding:o,fill:e.backgroundColor,"stroke-width":i,r:e.borderRadius,zIndex:8}).css(n).css({padding:0}).add().attr({y:-9999}),St||this.label.shadow(e.shadow),this.shared=e.shared},destroy:function(){this.label&&(this.label=this.label.destroy()),clearTimeout(this.hideTimer),clearTimeout(this.tooltipTimeout)},move:function(t,e,i,n){var r=this,o=r.now,s=r.options.animation!==!1&&!r.isHidden&&(dt(t-o.x)>1||dt(e-o.y)>1),a=r.followPointer||r.len>1;Xt(o,{x:s?(2*o.x+t)/3:t,y:s?(o.y+e)/2:e,anchorX:a?O:s?(2*o.anchorX+i)/3:i,anchorY:a?O:s?(o.anchorY+n)/2:n}),r.label.attr(o),s&&(clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout(function(){r&&r.move(t,e,i,n)},32))},hide:function(t){var e=this;clearTimeout(this.hideTimer),t=Kt(t,this.options.hideDelay,500),this.isHidden||(this.hideTimer=d(function(){e.label[t?"fadeOut":"hide"](),e.isHidden=!0},t))},getAnchor:function(t,e){var i,n,r,o=this.chart,s=o.inverted,a=o.plotTop,l=o.plotLeft,u=0,c=0,t=h(t);return i=t[0].tooltipPos,this.followPointer&&e&&(e.chartX===O&&(e=o.pointer.normalize(e)),i=[e.chartX-o.plotLeft,e.chartY-a]),i||(Ft(t,function(t){n=t.series.yAxis,r=t.series.xAxis,u+=t.plotX+(!s&&r?r.left-l:0),c+=(t.plotLow?(t.plotLow+t.plotHigh)/2:t.plotY)+(!s&&n?n.top-a:0)}),u/=t.length,c/=t.length,i=[s?o.plotWidth-c:u,this.shared&&!s&&t.length>1&&e?e.chartY-a:s?o.plotHeight-u:c]),zt(i,at)},getPosition:function(t,e,i){var n,r=this.chart,o=this.distance,s={},a=i.h||0,l=["y",r.chartHeight,e,i.plotY+r.plotTop,r.plotTop,r.plotTop+r.plotHeight],u=["x",r.chartWidth,t,i.plotX+r.plotLeft,r.plotLeft,r.plotLeft+r.plotWidth],c=!this.followPointer&&Kt(i.ttBelow,!r.inverted==!!i.negative),h=function(t,e,i,n,r,l){var u=i<n-o,h=n+o+i<e,d=n-o-i;if(n+=o,c&&h)s[t]=n;else if(!c&&u)s[t]=d;else if(u)s[t]=ht(l-i,d-a<0?d:d-a);else{if(!h)return!1;s[t]=ct(r,n+a+i>e?n:n+a)}},d=function(t,e,i,n){var r;return n<o||n>e-o?r=!1:s[t]=n<i/2?1:n>e-i/2?e-i-2:n-i/2,r},p=function(t){var e=l;l=u,u=e,n=t},f=function(){h.apply(0,l)!==!1?d.apply(0,u)===!1&&!n&&(p(!0),f()):n?s.x=s.y=0:(p(!0),f())};return(r.inverted||this.len>1)&&p(),f(),s},defaultFormatter:function(t){var e,i=this.points||h(this);return e=[t.tooltipFooterHeaderFormatter(i[0])],e=e.concat(t.bodyFormatter(i)),e.push(t.tooltipFooterHeaderFormatter(i[0],!0)),e.join("")},refresh:function(t,e){var i,n,r,o,s=this.chart,a=this.label,l=this.options,u={},c=[];o=l.formatter||this.defaultFormatter;var d,u=s.hoverPoints,p=this.shared;clearTimeout(this.hideTimer),this.followPointer=h(t)[0].series.tooltipOptions.followPointer,r=this.getAnchor(t,e),i=r[0],n=r[1],!p||t.series&&t.series.noSharedTooltip?u=t.getLabelConfig():(s.hoverPoints=t,u&&Ft(u,function(t){t.setState()}),Ft(t,function(t){t.setState("hover"),c.push(t.getLabelConfig())}),u={x:t[0].category,y:t[0].y},u.points=c,this.len=c.length,t=t[0]),o=o.call(u,this),u=t.series,this.distance=Kt(u.tooltipOptions.distance,16),o===!1?this.hide():(this.isHidden&&(Vt(a),a.attr("opacity",1).show()),a.attr({text:o}),d=l.borderColor||t.color||u.color||"#606060",a.attr({stroke:d}),this.updatePosition({plotX:i,plotY:n,negative:t.negative,ttBelow:t.ttBelow,h:r[2]||0}),this.isHidden=!1),qt(s,"tooltipRefresh",{text:o,x:i+s.plotLeft,y:n+s.plotTop,borderColor:d})},updatePosition:function(t){var e=this.chart,i=this.label,i=(this.options.positioner||this.getPosition).call(this,i.width,i.height,t);this.move(at(i.x),at(i.y||0),t.plotX+e.plotLeft,t.plotY+e.plotTop)},getXDateFormat:function(t,e,i){var n,r,o,e=e.dateTimeLabelFormats,s=i&&i.closestPointRange,a={millisecond:15,second:12,minute:9,hour:6,day:3},l="millisecond";if(s){o=F("%m-%d %H:%M:%S.%L",t.x);for(r in R){if(s===R.week&&+F("%w",t.x)===i.options.startOfWeek&&"00:00:00.000"===o.substr(6)){r="week";break}if(R[r]>s){r=l;break}if(a[r]&&o.substr(a[r])!=="01-01 00:00:00.000".substr(a[r]))break;"week"!==r&&(l=r)}r&&(n=e[r])}else n=e.day;return n||e.year},tooltipFooterHeaderFormatter:function(t,e){var i=e?"footer":"header",n=t.series,r=n.tooltipOptions,o=r.xDateFormat,s=n.xAxis,a=s&&"datetime"===s.options.type&&Jt(t.key),i=r[i+"Format"];return a&&!o&&(o=this.getXDateFormat(t,r,s)),a&&o&&(i=i.replace("{point.key}","{point.key:"+o+"}")),y(i,{point:t,series:n})},bodyFormatter:function(t){return zt(t,function(t){var e=t.series.tooltipOptions;return(e.pointFormatter||t.point.tooltipFormatter).call(t.point,e.pointFormat)})}};var ae;N=ot&&ot.documentElement.ontouchstart!==O;var le=rt.Pointer=function(t,e){this.init(t,e)};if(le.prototype={init:function(t,e){var i,n=e.chart,r=n.events,o=St?"":n.zoomType,n=t.inverted;this.options=e,this.chart=t,this.zoomX=i=/x/.test(o),this.zoomY=o=/y/.test(o),this.zoomHor=i&&!n||o&&n,this.zoomVert=o&&!n||i&&n,this.hasZoom=i||o,this.runChartClick=r&&!!r.click,this.pinchDown=[],this.lastValidTouch={},rt.Tooltip&&e.tooltip.enabled&&(t.tooltip=new se(t,e.tooltip),this.followTouchMove=Kt(e.tooltip.followTouchMove,!0)),this.setDOMEvents()},normalize:function(e,i){var n,r,e=e||t.event;return e.target||(e.target=e.srcElement),r=e.touches?e.touches.length?e.touches.item(0):e.changedTouches[0]:e,i||(this.chartPosition=i=Wt(this.chart.container)),r.pageX===O?(n=ct(e.x,e.clientX-i.left),r=e.y):(n=r.pageX-i.left,r=r.pageY-i.top),Xt(e,{chartX:at(n),chartY:at(r)})},getCoordinates:function(t){var e={xAxis:[],yAxis:[]};return Ft(this.chart.axes,function(i){e[i.isXAxis?"xAxis":"yAxis"].push({axis:i,value:i.toValue(t[i.horiz?"chartX":"chartY"])})}),e},runPointActions:function(t){var e,i,n,r,o=this.chart,s=o.series,a=o.tooltip,l=!!a&&a.shared,u=o.hoverPoint,c=o.hoverSeries,h=[Number.MAX_VALUE,Number.MAX_VALUE],d=[],p=[];if(!l&&!c)for(e=0;e<s.length;e++)!s[e].directTouch&&s[e].options.stickyTracking||(s=[]);if(c&&(l?c.noSharedTooltip:c.directTouch)&&u?p=[u]:(Ft(s,function(e){i=e.noSharedTooltip&&l,n=!l&&e.directTouch,e.visible&&!i&&!n&&Kt(e.options.enableMouseTracking,!0)&&(r=e.searchPoint(t,!i&&1===e.kdDimensions))&&d.push(r)}),Ft(d,function(t){t&&Ft(["dist","distX"],function(e,i){if(Jt(t[e])){var n=t[e]===h[i]&&t.series.group.zIndex>=p[i].series.group.zIndex;(t[e]<h[i]||n)&&(h[i]=t[e],p[i]=t)}})})),l)for(e=d.length;e--;)(d[e].clientX!==p[1].clientX||d[e].series.noSharedTooltip)&&d.splice(e,1);p[0]&&(p[0]!==this.prevKDPoint||a&&a.isHidden)?l&&!p[0].series.noSharedTooltip?(d.length&&a&&a.refresh(d,t),Ft(d,function(e){e.onMouseOver(t,e!==(c&&c.directTouch&&u||p[0]))}),this.prevKDPoint=p[1]):(a&&a.refresh(p[0],t),c&&c.directTouch||p[0].onMouseOver(t),this.prevKDPoint=p[0]):(s=c&&c.tooltipOptions.followPointer,a&&s&&!a.isHidden&&(s=a.getAnchor([{}],t),a.updatePosition({plotX:s[0],plotY:s[1]}))),this._onDocumentMouseMove||(this._onDocumentMouseMove=function(t){Et[ae]&&Et[ae].pointer.onDocumentMouseMove(t)},Bt(ot,"mousemove",this._onDocumentMouseMove)),Ft(l?d:[Kt(u,p[1])],function(e){Ft(o.axes,function(i){(!e||e.series[i.coll]===i)&&i.drawCrosshair(t,e)})})},reset:function(t,e){var i=this.chart,n=i.hoverSeries,r=i.hoverPoint,o=i.hoverPoints,s=i.tooltip,a=s&&s.shared?o:r;t&&a&&Ft(h(a),function(e){e.series.isCartesian&&void 0===e.plotX&&(t=!1)}),t?s&&a&&(s.refresh(a),r&&(r.setState(r.state,!0),Ft(i.axes,function(t){Kt(t.crosshair&&t.crosshair.snap,!0)?t.drawCrosshair(null,r):t.hideCrosshair()}))):(r&&r.onMouseOut(),o&&Ft(o,function(t){t.setState()}),n&&n.onMouseOut(),s&&s.hide(e),this._onDocumentMouseMove&&($t(ot,"mousemove",this._onDocumentMouseMove),this._onDocumentMouseMove=null),Ft(i.axes,function(t){t.hideCrosshair()}),this.hoverX=i.hoverPoints=i.hoverPoint=null)},scaleGroups:function(t,e){var i,n=this.chart;Ft(n.series,function(r){i=t||r.getPlotBox(),r.xAxis&&r.xAxis.zoomEnabled&&(r.group.attr(i),r.markerGroup&&(r.markerGroup.attr(i),r.markerGroup.clip(e?n.clipRect:null)),r.dataLabelsGroup&&r.dataLabelsGroup.attr(i))}),n.clipRect.attr(e||n.clipBox)},dragStart:function(t){var e=this.chart;e.mouseIsDown=t.type,e.cancelClick=!1,e.mouseDownX=this.mouseDownX=t.chartX,e.mouseDownY=this.mouseDownY=t.chartY},drag:function(t){var e,i=this.chart,n=i.options.chart,r=t.chartX,o=t.chartY,s=this.zoomHor,a=this.zoomVert,l=i.plotLeft,u=i.plotTop,c=i.plotWidth,h=i.plotHeight,d=this.selectionMarker,p=this.mouseDownX,f=this.mouseDownY,m=n.panKey&&t[n.panKey+"Key"];d&&d.touch||(r<l?r=l:r>l+c&&(r=l+c),o<u?o=u:o>u+h&&(o=u+h),this.hasDragged=Math.sqrt(Math.pow(p-r,2)+Math.pow(f-o,2)),this.hasDragged>10&&(e=i.isInsidePlot(p-l,f-u),i.hasCartesianSeries&&(this.zoomX||this.zoomY)&&e&&!m&&!d&&(this.selectionMarker=d=i.renderer.rect(l,u,s?1:c,a?1:h,0).attr({fill:n.selectionMarkerFill||"rgba(69,114,167,0.25)",zIndex:7}).add()),d&&s&&(r-=p,d.attr({width:dt(r),x:(r>0?0:r)+p})),d&&a&&(r=o-f,d.attr({height:dt(r),y:(r>0?0:r)+f})),e&&!d&&n.panning&&i.pan(t,n.panning)))},drop:function(t){var e=this,i=this.chart,n=this.hasPinched;if(this.selectionMarker){var r,o={originalEvent:t,xAxis:[],yAxis:[]},s=this.selectionMarker,a=s.attr?s.attr("x"):s.x,l=s.attr?s.attr("y"):s.y,c=s.attr?s.attr("width"):s.width,h=s.attr?s.attr("height"):s.height;(this.hasDragged||n)&&(Ft(i.axes,function(i){if(i.zoomEnabled&&u(i.min)&&(n||e[{xAxis:"zoomX",yAxis:"zoomY"}[i.coll]])){var s=i.horiz,d="touchend"===t.type?i.minPixelPadding:0,p=i.toValue((s?a:l)+d),s=i.toValue((s?a+c:l+h)-d);o[i.coll].push({axis:i,min:ht(p,s),max:ct(p,s)}),r=!0}}),r&&qt(i,"selection",o,function(t){i.zoom(Xt(t,n?{animation:!1}:null))})),this.selectionMarker=this.selectionMarker.destroy(),n&&this.scaleGroups()}i&&(p(i.container,{cursor:i._cursor}),i.cancelClick=this.hasDragged>10,i.mouseIsDown=this.hasDragged=this.hasPinched=!1,this.pinchDown=[])},onContainerMouseDown:function(t){t=this.normalize(t),t.preventDefault&&t.preventDefault(),this.dragStart(t)},onDocumentMouseUp:function(t){Et[ae]&&Et[ae].pointer.drop(t)},onDocumentMouseMove:function(t){var e=this.chart,i=this.chartPosition,t=this.normalize(t,i);i&&!this.inClass(t.target,"highcharts-tracker")&&!e.isInsidePlot(t.chartX-e.plotLeft,t.chartY-e.plotTop)&&this.reset()},onContainerMouseLeave:function(t){var e=Et[ae];e&&(t.relatedTarget||t.toElement)&&(e.pointer.reset(),e.pointer.chartPosition=null)},onContainerMouseMove:function(t){var e=this.chart;u(ae)&&Et[ae]&&Et[ae].mouseIsDown||(ae=e.index),t=this.normalize(t),t.returnValue=!1,"mousedown"===e.mouseIsDown&&this.drag(t),(this.inClass(t.target,"highcharts-tracker")||e.isInsidePlot(t.chartX-e.plotLeft,t.chartY-e.plotTop))&&!e.openMenu&&this.runPointActions(t)},inClass:function(t,e){for(var i;t;){if(i=c(t,"class")){if(i.indexOf(e)!==-1)return!0;if(i.indexOf("highcharts-container")!==-1)return!1}t=t.parentNode}},onTrackerMouseOut:function(t){var e=this.chart.hoverSeries,t=t.relatedTarget||t.toElement;!e||!t||e.options.stickyTracking||this.inClass(t,"highcharts-tooltip")||this.inClass(t,"highcharts-series-"+e.index)||e.onMouseOut()},onContainerClick:function(t){var e=this.chart,i=e.hoverPoint,n=e.plotLeft,r=e.plotTop,t=this.normalize(t);e.cancelClick||(i&&this.inClass(t.target,"highcharts-tracker")?(qt(i.series,"click",Xt(t,{point:i})),e.hoverPoint&&i.firePointEvent("click",t)):(Xt(t,this.getCoordinates(t)),e.isInsidePlot(t.chartX-n,t.chartY-r)&&qt(e,"click",t)))},setDOMEvents:function(){var t=this,e=t.chart.container;e.onmousedown=function(e){t.onContainerMouseDown(e)},e.onmousemove=function(e){t.onContainerMouseMove(e)},e.onclick=function(e){t.onContainerClick(e)},Bt(e,"mouseleave",t.onContainerMouseLeave),1===It&&Bt(ot,"mouseup",t.onDocumentMouseUp),N&&(e.ontouchstart=function(e){t.onContainerTouchStart(e)},e.ontouchmove=function(e){t.onContainerTouchMove(e)},1===It&&Bt(ot,"touchend",t.onDocumentTouchEnd))},destroy:function(){var t;$t(this.chart.container,"mouseleave",this.onContainerMouseLeave),It||($t(ot,"mouseup",this.onDocumentMouseUp),$t(ot,"touchend",this.onDocumentTouchEnd)),clearInterval(this.tooltipTimeout);for(t in this)this[t]=null}},Xt(rt.Pointer.prototype,{pinchTranslate:function(t,e,i,n,r,o){(this.zoomHor||this.pinchHor)&&this.pinchTranslateDirection(!0,t,e,i,n,r,o),(this.zoomVert||this.pinchVert)&&this.pinchTranslateDirection(!1,t,e,i,n,r,o)},pinchTranslateDirection:function(t,e,i,n,r,o,s,a){var l,u,c,h=this.chart,d=t?"x":"y",p=t?"X":"Y",f="chart"+p,m=t?"width":"height",g=h["plot"+(t?"Left":"Top")],v=a||1,y=h.inverted,b=h.bounds[t?"h":"v"],_=1===e.length,w=e[0][f],x=i[0][f],k=!_&&e[1][f],C=!_&&i[1][f],i=function(){!_&&dt(w-k)>20&&(v=a||dt(x-C)/dt(w-k)),u=(g-x)/v+w,l=h["plot"+(t?"Width":"Height")]/v};i(),e=u,e<b.min?(e=b.min,c=!0):e+l>b.max&&(e=b.max-l,c=!0),c?(x-=.8*(x-s[d][0]),_||(C-=.8*(C-s[d][1])),i()):s[d]=[x,C],y||(o[d]=u-g,o[m]=l),o=y?1/v:v,r[m]=l,r[d]=e,n[y?t?"scaleY":"scaleX":"scale"+p]=v,n["translate"+p]=o*g+(x-o*w)},pinch:function(t){var e=this,i=e.chart,n=e.pinchDown,r=t.touches,o=r.length,s=e.lastValidTouch,a=e.hasZoom,l=e.selectionMarker,u={},c=1===o&&(e.inClass(t.target,"highcharts-tracker")&&i.runTrackerClick||e.runChartClick),h={};o>1&&(e.initiated=!0),a&&e.initiated&&!c&&t.preventDefault(),zt(r,function(t){return e.normalize(t)}),"touchstart"===t.type?(Ft(r,function(t,e){n[e]={chartX:t.chartX,chartY:t.chartY}}),s.x=[n[0].chartX,n[1]&&n[1].chartX],s.y=[n[0].chartY,n[1]&&n[1].chartY],Ft(i.axes,function(t){if(t.zoomEnabled){var e=i.bounds[t.horiz?"h":"v"],n=t.minPixelPadding,r=t.toPixels(Kt(t.options.min,t.dataMin)),o=t.toPixels(Kt(t.options.max,t.dataMax)),s=ht(r,o),r=ct(r,o);e.min=ht(t.pos,s-n),e.max=ct(t.pos+t.len,r+n)}}),e.res=!0):n.length&&(l||(e.selectionMarker=l=Xt({destroy:At,touch:!0},i.plotBox)),e.pinchTranslate(n,r,u,l,h,s),e.hasPinched=a,e.scaleGroups(u,h),!a&&e.followTouchMove&&1===o?this.runPointActions(e.normalize(t)):e.res&&(e.res=!1,this.reset(!1,0)))},touch:function(t,e){var i,n=this.chart;ae=n.index,1===t.touches.length?(t=this.normalize(t),n.isInsidePlot(t.chartX-n.plotLeft,t.chartY-n.plotTop)&&!n.openMenu?(e&&this.runPointActions(t),"touchmove"===t.type&&(n=this.pinchDown,i=!!n[0]&&Math.sqrt(Math.pow(n[0].chartX-t.chartX,2)+Math.pow(n[0].chartY-t.chartY,2))>=4),Kt(i,!0)&&this.pinch(t)):e&&this.reset()):2===t.touches.length&&this.pinch(t)},onContainerTouchStart:function(t){this.touch(t,!0)},onContainerTouchMove:function(t){this.touch(t)},onDocumentTouchEnd:function(t){Et[ae]&&Et[ae].pointer.drop(t)}}),t.PointerEvent||t.MSPointerEvent){var ue={},ce=!!t.PointerEvent,he=function(){var t,e=[];e.item=function(t){return this[t]};for(t in ue)ue.hasOwnProperty(t)&&e.push({pageX:ue[t].pageX,pageY:ue[t].pageY,target:ue[t].target});return e},de=function(t,e,i,n){"touch"!==t.pointerType&&t.pointerType!==t.MSPOINTER_TYPE_TOUCH||!Et[ae]||(n(t),n=Et[ae].pointer,n[e]({type:i,target:t.currentTarget,preventDefault:At,touches:he()}))};Xt(le.prototype,{onContainerPointerDown:function(t){de(t,"onContainerTouchStart","touchstart",function(t){ue[t.pointerId]={pageX:t.pageX,pageY:t.pageY,target:t.currentTarget}})},onContainerPointerMove:function(t){de(t,"onContainerTouchMove","touchmove",function(t){ue[t.pointerId]={pageX:t.pageX,pageY:t.pageY},ue[t.pointerId].target||(ue[t.pointerId].target=t.currentTarget)})},onDocumentPointerUp:function(t){de(t,"onDocumentTouchEnd","touchend",function(t){delete ue[t.pointerId]})},batchMSEvents:function(t){t(this.chart.container,ce?"pointerdown":"MSPointerDown",this.onContainerPointerDown),t(this.chart.container,ce?"pointermove":"MSPointerMove",this.onContainerPointerMove),t(ot,ce?"pointerup":"MSPointerUp",this.onDocumentPointerUp)}}),Qt(le.prototype,"init",function(t,e,i){t.call(this,e,i),this.hasZoom&&p(e.container,{"-ms-touch-action":"none","touch-action":"none"})}),Qt(le.prototype,"setDOMEvents",function(t){t.apply(this),(this.hasZoom||this.followTouchMove)&&this.batchMSEvents(Bt)}),Qt(le.prototype,"destroy",function(t){this.batchMSEvents($t),t.call(this)})}var pe=rt.Legend=function(t,e){this.init(t,e)};pe.prototype={init:function(t,e){var i=this,r=e.itemStyle,o=e.itemMarginTop||0;this.options=e,e.enabled&&(i.itemStyle=r,i.itemHiddenStyle=n(r,e.itemHiddenStyle),i.itemMarginTop=o,i.padding=r=Kt(e.padding,8),i.initialItemX=r,i.initialItemY=r-5,i.maxItemWidth=0,i.chart=t,i.itemHeight=0,i.symbolWidth=Kt(e.symbolWidth,16),i.pages=[],i.render(),Bt(i.chart,"endResize",function(){i.positionCheckboxes()}))},colorizeItem:function(t,e){var i,n=this.options,r=t.legendItem,o=t.legendLine,s=t.legendSymbol,a=this.itemHiddenStyle.color,n=e?n.itemStyle.color:a,l=e?t.legendColor||t.color||"#CCC":a,a=t.options&&t.options.marker,u={fill:l};if(r&&r.css({fill:n,color:n}),o&&o.attr({stroke:l}),s){if(a&&s.isMarker)for(i in u.stroke=l,a=t.convertAttribs(a))r=a[i],r!==O&&(u[i]=r);s.attr(u)}},positionItem:function(t){var e=this.options,i=e.symbolPadding,e=!e.rtl,n=t._legendItemPos,r=n[0],n=n[1],o=t.checkbox;(t=t.legendGroup)&&t.element&&t.translate(e?r:this.legendWidth-r-2*i-4,n),o&&(o.x=r,o.y=n)},destroyItem:function(t){var e=t.checkbox;Ft(["legendItem","legendLine","legendSymbol","legendGroup"],function(e){t[e]&&(t[e]=t[e].destroy())}),e&&M(t.checkbox)},destroy:function(){var t=this.group,e=this.box;e&&(this.box=e.destroy()),t&&(this.group=t.destroy())},positionCheckboxes:function(t){var e,i=this.group.alignAttr,n=this.clipHeight||this.legendHeight,r=this.titleHeight;i&&(e=i.translateY,Ft(this.allItems,function(o){var s,a=o.checkbox;a&&(s=e+r+a.y+(t||0)+3,p(a,{left:i.translateX+o.checkboxOffset+a.x-20+"px",top:s+"px",display:s>e-6&&s<e+n-6?"":"none"}))}))},renderTitle:function(){var t=this.padding,e=this.options.title,i=0;e.text&&(this.title||(this.title=this.chart.renderer.label(e.text,t-3,t-4,null,null,null,null,null,"legend-title").attr({zIndex:1}).css(e.style).add(this.group)),t=this.title.getBBox(),i=t.height,this.offsetWidth=t.width,this.contentGroup.attr({translateY:i})),this.titleHeight=i},setText:function(t){var e=this.options;t.legendItem.attr({text:e.labelFormat?y(e.labelFormat,t):e.labelFormatter.call(t)})},renderItem:function(t){var e=this.chart,i=e.renderer,r=this.options,o="horizontal"===r.layout,s=this.symbolWidth,a=r.symbolPadding,l=this.itemStyle,u=this.itemHiddenStyle,c=this.padding,h=o?Kt(r.itemDistance,20):0,d=!r.rtl,p=r.width,f=r.itemMarginBottom||0,m=this.itemMarginTop,g=this.initialItemX,v=t.legendItem,y=t.series&&t.series.drawLegendSymbol?t.series:t,b=y.options,b=this.createCheckboxForItem&&b&&b.showCheckbox,_=r.useHTML;v||(t.legendGroup=i.g("legend-item").attr({zIndex:1}).add(this.scrollGroup),t.legendItem=v=i.text("",d?s+a:-a,this.baseline||0,_).css(n(t.visible?l:u)).attr({align:d?"left":"right",zIndex:2}).add(t.legendGroup),this.baseline||(this.fontMetrics=i.fontMetrics(l.fontSize,v),this.baseline=this.fontMetrics.f+3+m,v.attr("y",this.baseline)),y.drawLegendSymbol(this,t),this.setItemEvents&&this.setItemEvents(t,v,_,l,u),b&&this.createCheckboxForItem(t)),this.colorizeItem(t,t.visible),this.setText(t),i=v.getBBox(),s=t.checkboxOffset=r.itemWidth||t.legendItemWidth||s+a+i.width+h+(b?20:0),this.itemHeight=a=at(t.legendItemHeight||i.height),o&&this.itemX-g+s>(p||e.chartWidth-2*c-g-r.x)&&(this.itemX=g,this.itemY+=m+this.lastLineHeight+f,this.lastLineHeight=0),this.maxItemWidth=ct(this.maxItemWidth,s),this.lastItemY=m+this.itemY+f,this.lastLineHeight=ct(a,this.lastLineHeight),t._legendItemPos=[this.itemX,this.itemY],o?this.itemX+=s:(this.itemY+=m+a+f,this.lastLineHeight=a),this.offsetWidth=p||ct((o?this.itemX-g-h:s)+c,this.offsetWidth)},getAllItems:function(){var t=[];return Ft(this.chart.series,function(e){var i=e.options;Kt(i.showInLegend,!u(i.linkedTo)&&O,!0)&&(t=t.concat(e.legendItems||("point"===i.legendType?e.data:e)))}),t},adjustMargins:function(t,e){var i=this.chart,n=this.options,r=n.align.charAt(0)+n.verticalAlign.charAt(0)+n.layout.charAt(0);this.display&&!n.floating&&Ft([/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/],function(o,s){o.test(r)&&!u(t[s])&&(i[jt[s]]=ct(i[jt[s]],i.legend[(s+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][s]*n[s%2?"x":"y"]+Kt(n.margin,12)+e[s]))})},render:function(){var t,e,i,n,r=this,o=r.chart,s=o.renderer,a=r.group,l=r.box,u=r.options,c=r.padding,h=u.borderWidth,d=u.backgroundColor;r.itemX=r.initialItemX,r.itemY=r.initialItemY,r.offsetWidth=0,r.lastItemY=0,a||(r.group=a=s.g("legend").attr({zIndex:7}).add(),r.contentGroup=s.g().attr({zIndex:1}).add(a),r.scrollGroup=s.g().add(r.contentGroup)),r.renderTitle(),t=r.getAllItems(),w(t,function(t,e){return(t.options&&t.options.legendIndex||0)-(e.options&&e.options.legendIndex||0)}),u.reversed&&t.reverse(),r.allItems=t,r.display=e=!!t.length,r.lastLineHeight=0,Ft(t,function(t){r.renderItem(t)}),i=(u.width||r.offsetWidth)+c,n=r.lastItemY+r.lastLineHeight+r.titleHeight,n=r.handleOverflow(n),n+=c,(h||d)&&(l?i>0&&n>0&&(l[l.isNew?"attr":"animate"](l.crisp({width:i,height:n})),l.isNew=!1):(r.box=l=s.rect(0,0,i,n,u.borderRadius,h||0).attr({stroke:u.borderColor,"stroke-width":h||0,fill:d||"none"}).add(a).shadow(u.shadow),l.isNew=!0),l[e?"show":"hide"]()),r.legendWidth=i,r.legendHeight=n,Ft(t,function(t){r.positionItem(t)}),e&&a.align(Xt({width:i,height:n},u),!0,"spacingBox"),o.isResizing||this.positionCheckboxes()},handleOverflow:function(t){var e,i,n=this,r=this.chart,o=r.renderer,s=this.options,a=s.y,a=r.spacingBox.height+("top"===s.verticalAlign?-a:a)-this.padding,l=s.maxHeight,u=this.clipRect,c=s.navigation,h=Kt(c.animation,!0),d=c.arrowSize||12,p=this.nav,f=this.pages,m=this.padding,g=this.allItems,v=function(t){u.attr({height:t}),n.contentGroup.div&&(n.contentGroup.div.style.clip="rect("+m+"px,9999px,"+(m+t)+"px,0)")};return"horizontal"===s.layout&&(a/=2),l&&(a=ht(a,l)),f.length=0,t>a&&c.enabled!==!1?(this.clipHeight=e=ct(a-20-this.titleHeight-m,0),this.currentPage=Kt(this.currentPage,1),this.fullHeight=t,Ft(g,function(t,n){var r=t._legendItemPos[1],o=at(t.legendItem.getBBox().height),s=f.length;(!s||r-f[s-1]>e&&(i||r)!==f[s-1])&&(f.push(i||r),s++),n===g.length-1&&r+o-f[s-1]>e&&f.push(r),r!==i&&(i=r)}),u||(u=n.clipRect=o.clipRect(0,m,9999,0),n.contentGroup.clip(u)),v(e),p||(this.nav=p=o.g().attr({zIndex:1}).add(this.group),this.up=o.symbol("triangle",0,0,d,d).on("click",function(){n.scroll(-1,h)}).add(p),this.pager=o.text("",15,10).css(c.style).add(p),this.down=o.symbol("triangle-down",0,0,d,d).on("click",function(){n.scroll(1,h)}).add(p)),n.scroll(0),t=a):p&&(v(r.chartHeight),p.hide(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0),t},scroll:function(t,e){var i=this.pages,n=i.length,r=this.currentPage+t,o=this.clipHeight,s=this.options.navigation,a=s.activeColor,s=s.inactiveColor,l=this.pager,u=this.padding;r>n&&(r=n),r>0&&(e!==O&&S(e,this.chart),this.nav.attr({translateX:u,translateY:o+this.padding+7+this.titleHeight,visibility:"visible"}),this.up.attr({fill:1===r?s:a}).css({cursor:1===r?"default":"pointer"}),l.attr({text:r+"/"+n}),this.down.attr({x:18+this.pager.getBBox().width,fill:r===n?s:a}).css({cursor:r===n?"default":"pointer"}),i=-i[r-1]+this.initialItemY,this.scrollGroup.animate({translateY:i}),this.currentPage=r,this.positionCheckboxes(i))}},ie=rt.LegendSymbolMixin={drawRectangle:function(t,e){var i=t.options.symbolHeight||t.fontMetrics.f;e.legendSymbol=this.chart.renderer.rect(0,t.baseline-i+1,t.symbolWidth,i,t.options.symbolRadius||0).attr({zIndex:3}).add(e.legendGroup)},drawLineMarker:function(t){var e,i=this.options,n=i.marker,r=t.symbolWidth,o=this.chart.renderer,s=this.legendGroup,t=t.baseline-at(.3*t.fontMetrics.b);i.lineWidth&&(e={"stroke-width":i.lineWidth},i.dashStyle&&(e.dashstyle=i.dashStyle),this.legendLine=o.path(["M",0,t,"L",r,t]).attr(e).add(s)),n&&n.enabled!==!1&&(i=n.radius,this.legendSymbol=n=o.symbol(this.symbol,r/2-i,t-i,2*i,2*i,n).add(s),n.isMarker=!0)}},(/Trident\/7\.0/.test(vt)||xt)&&Qt(pe.prototype,"positionItem",function(t,e){var i=this,n=function(){e._legendItemPos&&t.call(i,e)};n(),setTimeout(n)});var fe=rt.Chart=function(){this.getArgs.apply(this,arguments)};rt.chart=function(t,e,i){return new fe(t,e,i)},fe.prototype={callbacks:[],getArgs:function(){var t=[].slice.call(arguments);(o(t[0])||t[0].nodeName)&&(this.renderTo=t.shift()),this.init(t[0],t[1]);
},init:function(t,e){var i,r=t.series;t.series=null,i=n(H,t),i.series=t.series=r,this.userOptions=t,r=i.chart,this.margin=this.splashArray("margin",r),this.spacing=this.splashArray("spacing",r);var o=r.events;this.bounds={h:{},v:{}},this.callback=e,this.isResizing=0,this.options=i,this.axes=[],this.series=[],this.hasCartesianSeries=r.showAxes;var s,a=this;if(a.index=Et.length,Et.push(a),It++,r.reflow!==!1&&Bt(a,"load",function(){a.initReflow()}),o)for(s in o)Bt(a,s,o[s]);a.xAxis=[],a.yAxis=[],a.animation=!St&&Kt(r.animation,!0),a.pointCount=a.colorCounter=a.symbolCounter=0,a.firstRender()},initSeries:function(t){var i=this.options.chart;return(i=Nt[t.type||i.type||i.defaultSeriesType])||e(17,!0),i=new i,i.init(this,t),i},isInsidePlot:function(t,e,i){var n=i?e:t,t=i?t:e;return n>=0&&n<=this.plotWidth&&t>=0&&t<=this.plotHeight},redraw:function(t){var e,i,n=this.axes,r=this.series,o=this.pointer,s=this.legend,a=this.isDirtyLegend,l=this.hasCartesianSeries,u=this.isDirtyBox,c=r.length,h=c,d=this.renderer,p=d.isHidden(),f=[];for(S(t,this),p&&this.cloneRenderTo(),this.layOutTitles();h--;)if(t=r[h],t.options.stacking&&(e=!0,t.isDirty)){i=!0;break}if(i)for(h=c;h--;)t=r[h],t.options.stacking&&(t.isDirty=!0);Ft(r,function(t){t.isDirty&&"point"===t.options.legendType&&(t.updateTotals&&t.updateTotals(),a=!0),t.isDirtyData&&qt(t,"updatedData")}),a&&s.options.enabled&&(s.render(),this.isDirtyLegend=!1),e&&this.getStacks(),l&&!this.isResizing&&(this.maxTicks=null,Ft(n,function(t){t.setScale()})),this.getMargins(),l&&(Ft(n,function(t){t.isDirty&&(u=!0)}),Ft(n,function(t){var i=t.min+","+t.max;t.extKey!==i&&(t.extKey=i,f.push(function(){qt(t,"afterSetExtremes",Xt(t.eventArgs,t.getExtremes())),delete t.eventArgs})),(u||e)&&t.redraw()})),u&&this.drawChartBox(),Ft(r,function(t){t.isDirty&&t.visible&&(!t.isCartesian||t.xAxis)&&t.redraw()}),o&&o.reset(!0),d.draw(),qt(this,"redraw"),p&&this.cloneRenderTo(!0),Ft(f,function(t){t.call()})},get:function(t){var e,i,n=this.axes,r=this.series;for(e=0;e<n.length;e++)if(n[e].options.id===t)return n[e];for(e=0;e<r.length;e++)if(r[e].options.id===t)return r[e];for(e=0;e<r.length;e++)for(i=r[e].points||[],n=0;n<i.length;n++)if(i[n].id===t)return i[n];return null},getAxes:function(){var t=this,e=this.options,i=e.xAxis=h(e.xAxis||{}),e=e.yAxis=h(e.yAxis||{});Ft(i,function(t,e){t.index=e,t.isX=!0}),Ft(e,function(t,e){t.index=e}),i=i.concat(e),Ft(i,function(e){new oe(t,e)})},getSelectedPoints:function(){var t=[];return Ft(this.series,function(e){t=t.concat(Rt(e.points||[],function(t){return t.selected}))}),t},getSelectedSeries:function(){return Rt(this.series,function(t){return t.selected})},setTitle:function(t,e,i){var r,o,s=this,a=s.options;o=a.title=n(a.title,t),r=a.subtitle=n(a.subtitle,e),a=r,Ft([["title",t,o],["subtitle",e,a]],function(t){var e=t[0],i=s[e],n=t[1],t=t[2];i&&n&&(s[e]=i=i.destroy()),t&&t.text&&!i&&(s[e]=s.renderer.text(t.text,0,0,t.useHTML).attr({align:t.align,"class":"highcharts-"+e,zIndex:t.zIndex||4}).css(t.style).add())}),s.layOutTitles(i)},layOutTitles:function(t){var e=0,i=this.title,n=this.subtitle,r=this.options,o=r.title,r=r.subtitle,s=this.renderer,a=this.spacingBox;!i||(i.css({width:(o.width||a.width+o.widthAdjust)+"px"}).align(Xt({y:s.fontMetrics(o.style.fontSize,i).b-3},o),!1,a),o.floating||o.verticalAlign)||(e=i.getBBox().height),n&&(n.css({width:(r.width||a.width+r.widthAdjust)+"px"}).align(Xt({y:e+(o.margin-13)+s.fontMetrics(r.style.fontSize,i).b},r),!1,a),!r.floating&&!r.verticalAlign&&(e=ut(e+n.getBBox().height))),i=this.titleOffset!==e,this.titleOffset=e,!this.isDirtyBox&&i&&(this.isDirtyBox=i,this.hasRendered&&Kt(t,!0)&&this.isDirtyBox&&this.redraw())},getChartSize:function(){var t=this.options.chart,e=t.width,t=t.height,i=this.renderToClone||this.renderTo;u(e)||(this.containerWidth=Yt(i,"width")),u(t)||(this.containerHeight=Yt(i,"height")),this.chartWidth=ct(0,e||this.containerWidth||600),this.chartHeight=ct(0,Kt(t,this.containerHeight>19?this.containerHeight:400))},cloneRenderTo:function(t){var e=this.renderToClone,i=this.container;t?e&&(this.renderTo.appendChild(i),M(e),delete this.renderToClone):(i&&i.parentNode===this.renderTo&&this.renderTo.removeChild(i),this.renderToClone=e=this.renderTo.cloneNode(0),p(e,{position:"absolute",top:"-9999px",display:"block"}),e.style.setProperty&&e.style.setProperty("display","block","important"),ot.body.appendChild(e),i&&e.appendChild(i))},getContainer:function(){var t,i,n,s=this.options,a=s.chart;t=this.renderTo;var l="highcharts-"+Lt++;t||(this.renderTo=t=a.renderTo),o(t)&&(this.renderTo=t=ot.getElementById(t)),t||e(13,!0),i=r(c(t,"data-highcharts-chart")),Jt(i)&&Et[i]&&Et[i].hasRendered&&Et[i].destroy(),c(t,"data-highcharts-chart",this.index),t.innerHTML="",!a.skipClone&&!t.offsetWidth&&this.cloneRenderTo(),this.getChartSize(),i=this.chartWidth,n=this.chartHeight,this.container=t=f(Pt,{className:"highcharts-container"+(a.className?" "+a.className:""),id:l},Xt({position:"relative",overflow:"hidden",width:i+"px",height:n+"px",textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)"},a.style),this.renderToClone||t),this._cursor=t.style.cursor,this.renderer=new(rt[a.renderer]||j)(t,i,n,a.style,a.forExport,s.exporting&&s.exporting.allowHTML),St&&this.renderer.create(this,t,i,n),this.renderer.chartIndex=this.index},getMargins:function(t){var e=this.spacing,i=this.margin,n=this.titleOffset;this.resetMargins(),n&&!u(i[0])&&(this.plotTop=ct(this.plotTop,n+this.options.title.margin+e[0])),this.legend.adjustMargins(i,e),this.extraBottomMargin&&(this.marginBottom+=this.extraBottomMargin),this.extraTopMargin&&(this.plotTop+=this.extraTopMargin),t||this.getAxisMargins()},getAxisMargins:function(){var t=this,e=t.axisOffset=[0,0,0,0],i=t.margin;t.hasCartesianSeries&&Ft(t.axes,function(t){t.visible&&t.getOffset()}),Ft(jt,function(n,r){u(i[r])||(t[n]+=e[r])}),t.setChartSize()},reflow:function(e){var i=this,n=i.options.chart,r=i.renderTo,o=n.width||Yt(r,"width"),s=n.height||Yt(r,"height"),n=e?e.target:t;i.hasUserSize||i.isPrinting||!o||!s||n!==t&&n!==ot||(o===i.containerWidth&&s===i.containerHeight||(clearTimeout(i.reflowTimeout),i.reflowTimeout=d(function(){i.container&&(i.setSize(o,s,!1),i.hasUserSize=null)},e?100:0)),i.containerWidth=o,i.containerHeight=s)},initReflow:function(){var e=this,i=function(t){e.reflow(t)};Bt(t,"resize",i),Bt(e,"destroy",function(){$t(t,"resize",i)})},setSize:function(t,e,i){var n,r,o=this,s=o.renderer;o.isResizing+=1,S(i,o),o.oldChartHeight=o.chartHeight,o.oldChartWidth=o.chartWidth,u(t)&&(o.chartWidth=n=ct(0,at(t)),o.hasUserSize=!!n),u(e)&&(o.chartHeight=r=ct(0,at(e))),t=s.globalAnimation,(t?Ut:p)(o.container,{width:n+"px",height:r+"px"},t),o.setChartSize(!0),s.setSize(n,r,i),o.maxTicks=null,Ft(o.axes,function(t){t.isDirty=!0,t.setScale()}),Ft(o.series,function(t){t.isDirty=!0}),o.isDirtyLegend=!0,o.isDirtyBox=!0,o.layOutTitles(),o.getMargins(),o.redraw(i),o.oldChartHeight=null,qt(o,"resize"),d(function(){o&&qt(o,"endResize",null,function(){o.isResizing-=1})},D(t).duration)},setChartSize:function(t){var e,i,n,r,o=this.inverted,s=this.renderer,a=this.chartWidth,l=this.chartHeight,u=this.options.chart,c=this.spacing,h=this.clipOffset;this.plotLeft=e=at(this.plotLeft),this.plotTop=i=at(this.plotTop),this.plotWidth=n=ct(0,at(a-e-this.marginRight)),this.plotHeight=r=ct(0,at(l-i-this.marginBottom)),this.plotSizeX=o?r:n,this.plotSizeY=o?n:r,this.plotBorderWidth=u.plotBorderWidth||0,this.spacingBox=s.spacingBox={x:c[3],y:c[0],width:a-c[3]-c[1],height:l-c[0]-c[2]},this.plotBox=s.plotBox={x:e,y:i,width:n,height:r},a=2*lt(this.plotBorderWidth/2),o=ut(ct(a,h[3])/2),s=ut(ct(a,h[0])/2),this.clipBox={x:o,y:s,width:lt(this.plotSizeX-ct(a,h[1])/2-o),height:ct(0,lt(this.plotSizeY-ct(a,h[2])/2-s))},t||Ft(this.axes,function(t){t.setAxisSize(),t.setAxisTranslation()})},resetMargins:function(){var t=this;Ft(jt,function(e,i){t[e]=Kt(t.margin[i],t.spacing[i])}),t.axisOffset=[0,0,0,0],t.clipOffset=[0,0,0,0]},drawChartBox:function(){var t,e=this.options.chart,i=this.renderer,n=this.chartWidth,r=this.chartHeight,o=this.chartBackground,s=this.plotBackground,a=this.plotBorder,l=this.plotBGImage,u=e.borderWidth||0,c=e.backgroundColor,h=e.plotBackgroundColor,d=e.plotBackgroundImage,p=e.plotBorderWidth||0,f=this.plotLeft,m=this.plotTop,g=this.plotWidth,v=this.plotHeight,y=this.plotBox,b=this.clipRect,_=this.clipBox;t=u+(e.shadow?8:0),(u||c)&&(o?o.animate(o.crisp({width:n-t,height:r-t})):(o={fill:c||"none"},u&&(o.stroke=e.borderColor,o["stroke-width"]=u),this.chartBackground=i.rect(t/2,t/2,n-t,r-t,e.borderRadius,u).attr(o).addClass("highcharts-background").add().shadow(e.shadow))),h&&(s?s.animate(y):this.plotBackground=i.rect(f,m,g,v,0).attr({fill:h}).add().shadow(e.plotShadow)),d&&(l?l.animate(y):this.plotBGImage=i.image(d,f,m,g,v).add()),b?b.animate({width:_.width,height:_.height}):this.clipRect=i.clipRect(_),p&&(a?(a.strokeWidth=-p,a.animate(a.crisp({x:f,y:m,width:g,height:v}))):this.plotBorder=i.rect(f,m,g,v,0,-p).attr({stroke:e.plotBorderColor,"stroke-width":p,fill:"none",zIndex:1}).add()),this.isDirtyBox=!1},propFromSeries:function(){var t,e,i,n=this,r=n.options.chart,o=n.options.series;Ft(["inverted","angular","polar"],function(s){for(t=Nt[r.type||r.defaultSeriesType],i=n[s]||r[s]||t&&t.prototype[s],e=o&&o.length;!i&&e--;)(t=Nt[o[e].type])&&t.prototype[s]&&(i=!0);n[s]=i})},linkSeries:function(){var t=this,e=t.series;Ft(e,function(t){t.linkedSeries.length=0}),Ft(e,function(e){var i=e.options.linkedTo;o(i)&&(i=":previous"===i?t.series[e.index-1]:t.get(i))&&(i.linkedSeries.push(e),e.linkedParent=i,e.visible=Kt(e.options.visible,i.options.visible,e.visible))})},renderSeries:function(){Ft(this.series,function(t){t.translate(),t.render()})},renderLabels:function(){var t=this,e=t.options.labels;e.items&&Ft(e.items,function(i){var n=Xt(e.style,i.style),o=r(n.left)+t.plotLeft,s=r(n.top)+t.plotTop+12;delete n.left,delete n.top,t.renderer.text(i.html,o,s).attr({zIndex:2}).css(n).add()})},render:function(){var t,e,i,n,r=this.axes,o=this.renderer,s=this.options;this.setTitle(),this.legend=new pe(this,s.legend),this.getStacks&&this.getStacks(),this.getMargins(!0),this.setChartSize(),t=this.plotWidth,e=this.plotHeight-=21,Ft(r,function(t){t.setScale()}),this.getAxisMargins(),i=t/this.plotWidth>1.1,n=e/this.plotHeight>1.05,(i||n)&&(this.maxTicks=null,Ft(r,function(t){(t.horiz&&i||!t.horiz&&n)&&t.setTickInterval(!0)}),this.getMargins()),this.drawChartBox(),this.hasCartesianSeries&&Ft(r,function(t){t.visible&&t.render()}),this.seriesGroup||(this.seriesGroup=o.g("series-group").attr({zIndex:3}).add()),this.renderSeries(),this.renderLabels(),this.showCredits(s.credits),this.hasRendered=!0},showCredits:function(e){e.enabled&&!this.credits&&(this.credits=this.renderer.text(e.text,0,0).on("click",function(){e.href&&(t.location.href=e.href)}).attr({align:e.position.align,zIndex:8}).css(e.style).add().align(e.position))},destroy:function(){var t,e=this,i=e.axes,n=e.series,r=e.container,o=r&&r.parentNode;for(qt(e,"destroy"),Et[e.index]=O,It--,e.renderTo.removeAttribute("data-highcharts-chart"),$t(e),t=i.length;t--;)i[t]=i[t].destroy();for(t=n.length;t--;)n[t]=n[t].destroy();Ft("title,subtitle,chartBackground,plotBackground,plotBGImage,plotBorder,seriesGroup,clipRect,credits,pointer,scroller,rangeSelector,legend,resetZoomButton,tooltip,renderer".split(","),function(t){var i=e[t];i&&i.destroy&&(e[t]=i.destroy())}),r&&(r.innerHTML="",$t(r),o&&M(r));for(t in e)delete e[t]},isReadyToRender:function(){var e=this;return!(!Mt&&t==t.top&&"complete"!==ot.readyState||St&&!t.canvg)||(St?re.push(function(){e.firstRender()},e.options.global.canvasToolsURL):ot.attachEvent("onreadystatechange",function(){ot.detachEvent("onreadystatechange",e.firstRender),"complete"===ot.readyState&&e.firstRender()}),!1)},firstRender:function(){var t=this,e=t.options;t.isReadyToRender()&&(t.getContainer(),qt(t,"init"),t.resetMargins(),t.setChartSize(),t.propFromSeries(),t.getAxes(),Ft(e.series||[],function(e){t.initSeries(e)}),t.linkSeries(),qt(t,"beforeRender"),rt.Pointer&&(t.pointer=new le(t,e)),t.render(),t.renderer.draw(),!t.renderer.imgCount&&t.onload&&t.onload(),t.cloneRenderTo(!0))},onload:function(){var t=this;Ft([this.callback].concat(this.callbacks),function(e){e&&void 0!==t.index&&e.apply(t,[t])}),qt(t,"load"),this.onload=null},splashArray:function(t,e){var i=e[t],i=s(i)?i:[i,i,i,i];return[Kt(e[t+"Top"],i[0]),Kt(e[t+"Right"],i[1]),Kt(e[t+"Bottom"],i[2]),Kt(e[t+"Left"],i[3])]}};var ne=rt.CenteredSeriesMixin={getCenter:function(){var t,e,i=this.options,n=this.chart,r=2*(i.slicedOffset||0),o=n.plotWidth-2*r,n=n.plotHeight-2*r,s=i.center,s=[Kt(s[0],"50%"),Kt(s[1],"50%"),i.size||"100%",i.innerSize||0],a=ht(o,n);for(t=0;t<4;++t)e=s[t],i=t<2||2===t&&/%$/.test(e),s[t]=(/%$/.test(e)?[o,n,a,s[2]][t]*parseFloat(e)/100:parseFloat(e))+(i?r:0);return s[3]>s[2]&&(s[3]=s[2]),s}},me=function(){};me.prototype={init:function(t,e,i){return this.series=t,this.color=t.color,this.applyOptions(e,i),this.pointAttr={},t.options.colorByPoint&&(e=t.options.colors||t.chart.options.colors,this.color=this.color||e[t.colorCounter++],t.colorCounter===e.length)&&(t.colorCounter=0),t.chart.pointCount++,this},applyOptions:function(t,e){var i=this.series,n=i.options.pointValKey||i.pointValKey,t=me.prototype.optionsToObject.call(this,t);return Xt(this,t),this.options=this.options?Xt(this.options,t):t,n&&(this.y=this[n]),this.isNull=null===this.x||null===this.y,void 0===this.x&&i&&(this.x=void 0===e?i.autoIncrement():e),this},optionsToObject:function(t){var e={},i=this.series,n=i.options.keys,r=n||i.pointArrayMap||["y"],o=r.length,s=0,l=0;if(Jt(t)||null===t)e[r[0]]=t;else if(a(t))for(!n&&t.length>o&&(i=typeof t[0],"string"===i?e.name=t[0]:"number"===i&&(e.x=t[0]),s++);l<o;)n&&void 0===t[s]||(e[r[l]]=t[s]),s++,l++;else"object"==typeof t&&(e=t,t.dataLabels&&(i._hasPointLabels=!0),t.marker&&(i._hasPointMarkers=!0));return e},destroy:function(){var t,e=this.series.chart,i=e.hoverPoints;e.pointCount--,i&&(this.setState(),l(i,this),!i.length)&&(e.hoverPoints=null),this===e.hoverPoint&&this.onMouseOut(),(this.graphic||this.dataLabel)&&($t(this),this.destroyElements()),this.legendItem&&e.legend.destroyItem(this);for(t in this)this[t]=null},destroyElements:function(){for(var t,e=["graphic","dataLabel","dataLabelUpper","connector","shadowGroup"],i=6;i--;)t=e[i],this[t]&&(this[t]=this[t].destroy())},getLabelConfig:function(){return{x:this.category,y:this.y,color:this.color,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}},tooltipFormatter:function(t){var e=this.series,i=e.tooltipOptions,n=Kt(i.valueDecimals,""),r=i.valuePrefix||"",o=i.valueSuffix||"";return Ft(e.pointArrayMap||["y"],function(e){e="{point."+e,(r||o)&&(t=t.replace(e+"}",r+e+"}"+o)),t=t.replace(e+"}",e+":,."+n+"f}")}),y(t,{point:this,series:this.series})},firePointEvent:function(t,e,i){var n=this,r=this.series.options;(r.point.events[t]||n.options&&n.options.events&&n.options.events[t])&&this.importEvents(),"click"===t&&r.allowPointSelect&&(i=function(t){n.select&&n.select(null,t.ctrlKey||t.metaKey||t.shiftKey)}),qt(this,t,e,i)},visible:!0};var ge=rt.Series=function(){};ge.prototype={isCartesian:!0,type:"line",pointClass:me,sorted:!0,requireSorting:!0,pointAttrToOptions:{stroke:"lineColor","stroke-width":"lineWidth",fill:"fillColor",r:"radius"},directTouch:!1,axisTypes:["xAxis","yAxis"],colorCounter:0,parallelArrays:["x","y"],init:function(t,e){var i,n,r=this,o=t.series,s=function(t,e){return Kt(t.options.index,t._i)-Kt(e.options.index,e._i)};r.chart=t,r.options=e=r.setOptions(e),r.linkedSeries=[],r.bindAxes(),Xt(r,{name:e.name,state:"",pointAttr:{},visible:e.visible!==!1,selected:e.selected===!0}),St&&(e.animation=!1),n=e.events;for(i in n)Bt(r,i,n[i]);(n&&n.click||e.point&&e.point.events&&e.point.events.click||e.allowPointSelect)&&(t.runTrackerClick=!0),r.getColor(),r.getSymbol(),Ft(r.parallelArrays,function(t){r[t+"Data"]=[]}),r.setData(e.data,!1),r.isCartesian&&(t.hasCartesianSeries=!0),o.push(r),r._i=o.length-1,w(o,s),this.yAxis&&w(this.yAxis.series,s),Ft(o,function(t,e){t.index=e,t.name=t.name||"Series "+(e+1)})},bindAxes:function(){var t,i=this,n=i.options,r=i.chart;Ft(i.axisTypes||[],function(o){Ft(r[o],function(e){t=e.options,(n[o]===t.index||n[o]!==O&&n[o]===t.id||n[o]===O&&0===t.index)&&(e.series.push(i),i[o]=e,e.isDirty=!0)}),!i[o]&&i.optionalAxis!==o&&e(18,!0)})},updateParallelArrays:function(t,e){var i=t.series,n=arguments,r=Jt(e)?function(n){var r="y"===n&&i.toYData?i.toYData(t):t[n];i[n+"Data"][e]=r}:function(t){Array.prototype[e].apply(i[t+"Data"],Array.prototype.slice.call(n,2))};Ft(i.parallelArrays,r)},autoIncrement:function(){var t,e=this.options,i=this.xIncrement,n=e.pointIntervalUnit,i=Kt(i,e.pointStart,0);return this.pointInterval=t=Kt(this.pointInterval,e.pointInterval,1),n&&(e=new W(i),"day"===n?e=+e[et](e[G]()+t):"month"===n?e=+e[it](e[X]()+t):"year"===n&&(e=+e[nt](e[J]()+t)),t=e-i),this.xIncrement=i+t,i},setOptions:function(t){var e=this.chart,i=e.options.plotOptions,e=e.userOptions||{},r=e.plotOptions||{},o=i[this.type];return this.userOptions=t,i=n(o,i.series,t),this.tooltipOptions=n(H.tooltip,H.plotOptions[this.type].tooltip,e.tooltip,r.series&&r.series.tooltip,r[this.type]&&r[this.type].tooltip,t.tooltip),null===o.marker&&delete i.marker,this.zoneAxis=i.zoneAxis,t=this.zones=(i.zones||[]).slice(),!i.negativeColor&&!i.negativeFillColor||i.zones||t.push({value:i[this.zoneAxis+"Threshold"]||i.threshold||0,color:i.negativeColor,fillColor:i.negativeFillColor}),t.length&&u(t[t.length-1].value)&&t.push({color:this.color,fillColor:this.fillColor}),i},getCyclic:function(t,e,i){var n=this.userOptions,r="_"+t+"Index",o=t+"Counter";e||(u(n[r])?e=n[r]:(n[r]=e=this.chart[o]%i.length,this.chart[o]+=1),e=i[e]),this[t]=e},getColor:function(){this.options.colorByPoint?this.options.color=null:this.getCyclic("color",this.options.color||Zt[this.type].color,this.chart.options.colors)},getSymbol:function(){var t=this.options.marker;this.getCyclic("symbol",t.symbol,this.chart.options.symbols),/^url/.test(this.symbol)&&(t.radius=0)},drawLegendSymbol:ie.drawLineMarker,setData:function(t,i,n,r){var s,l=this,c=l.points,h=c&&c.length||0,d=l.options,p=l.chart,f=null,m=l.xAxis,g=m&&!!m.categories,v=d.turboThreshold,y=this.xData,b=this.yData,_=(s=l.pointArrayMap)&&s.length,t=t||[];if(s=t.length,i=Kt(i,!0),r!==!1&&s&&h===s&&!l.cropped&&!l.hasGroupedData&&l.visible)Ft(t,function(t,e){c[e].update&&t!==d.data[e]&&c[e].update(t,!1,null,!1)});else{if(l.xIncrement=null,l.colorCounter=0,Ft(this.parallelArrays,function(t){l[t+"Data"].length=0}),v&&s>v){for(n=0;null===f&&n<s;)f=t[n],n++;if(Jt(f)){for(g=Kt(d.pointStart,0),f=Kt(d.pointInterval,1),n=0;n<s;n++)y[n]=g,b[n]=t[n],g+=f;l.xIncrement=g}else if(a(f))if(_)for(n=0;n<s;n++)f=t[n],y[n]=f[0],b[n]=f.slice(1,_+1);else for(n=0;n<s;n++)f=t[n],y[n]=f[0],b[n]=f[1];else e(12)}else for(n=0;n<s;n++)t[n]!==O&&(f={series:l},l.pointClass.prototype.applyOptions.apply(f,[t[n]]),l.updateParallelArrays(f,n),g&&u(f.name))&&(m.names[f.x]=f.name);for(o(b[0])&&e(14,!0),l.data=[],l.options.data=l.userOptions.data=t,n=h;n--;)c[n]&&c[n].destroy&&c[n].destroy();m&&(m.minRange=m.userMinRange),l.isDirty=l.isDirtyData=p.isDirtyBox=!0,n=!1}"point"===d.legendType&&(this.processData(),this.generatePoints()),i&&p.redraw(n)},processData:function(t){var i,n=this.xData,r=this.yData,o=n.length;i=0;var s,a,l,u=this.xAxis,c=this.options;l=c.cropThreshold;var h,d,p=this.getExtremesFromAll||c.getExtremesFromAll,f=this.isCartesian,c=u&&u.val2lin,m=u&&u.isLog;if(f&&!this.isDirty&&!u.isDirty&&!this.yAxis.isDirty&&!t)return!1;for(u&&(t=u.getExtremes(),h=t.min,d=t.max),f&&this.sorted&&!p&&(!l||o>l||this.forceCrop)&&(n[o-1]<h||n[0]>d?(n=[],r=[]):(n[0]<h||n[o-1]>d)&&(i=this.cropData(this.xData,this.yData,h,d),n=i.xData,r=i.yData,i=i.start,s=!0)),l=n.length||1;--l;)o=m?c(n[l])-c(n[l-1]):n[l]-n[l-1],o>0&&(a===O||o<a)?a=o:o<0&&this.requireSorting&&e(15);this.cropped=s,this.cropStart=i,this.processedXData=n,this.processedYData=r,this.closestPointRange=a},cropData:function(t,e,i,n){var r,o=t.length,s=0,a=o,l=Kt(this.cropShoulder,1);for(r=0;r<o;r++)if(t[r]>=i){s=ct(0,r-l);break}for(i=r;i<o;i++)if(t[i]>n){a=i+l;break}return{xData:t.slice(s,a),yData:e.slice(s,a),start:s,end:a}},generatePoints:function(){var t,e,i,n,r=this.options.data,o=this.data,s=this.processedXData,a=this.processedYData,l=this.pointClass,u=s.length,c=this.cropStart||0,d=this.hasGroupedData,p=[];for(o||d||(o=[],o.length=r.length,o=this.data=o),n=0;n<u;n++)e=c+n,d?(p[n]=(new l).init(this,[s[n]].concat(h(a[n]))),p[n].dataGroup=this.groupMap[n]):(o[e]?i=o[e]:r[e]!==O&&(o[e]=i=(new l).init(this,r[e],s[n])),p[n]=i),p[n].index=e;if(o&&(u!==(t=o.length)||d))for(n=0;n<t;n++)n===c&&!d&&(n+=u),o[n]&&(o[n].destroyElements(),o[n].plotX=O);this.data=o,this.points=p},getExtremes:function(t){var e,i=this.yAxis,n=this.processedXData,r=[],o=0;e=this.xAxis.getExtremes();var s,a,l,u,c=e.min,h=e.max,t=t||this.stackedYData||this.processedYData||[];for(e=t.length,u=0;u<e;u++)if(a=n[u],l=t[u],s=null!==l&&l!==O&&(!i.isLog||l.length||l>0),a=this.getExtremesFromAll||this.options.getExtremesFromAll||this.cropped||(n[u+1]||a)>=c&&(n[u-1]||a)<=h,s&&a)if(s=l.length)for(;s--;)null!==l[s]&&(r[o++]=l[s]);else r[o++]=l;this.dataMin=x(r),this.dataMax=k(r)},translate:function(){this.processedXData||this.processData(),this.generatePoints();for(var t,i,n,r,o=this.options,s=o.stacking,a=this.xAxis,l=a.categories,c=this.yAxis,h=this.points,d=h.length,p=!!this.modifyValue,f=o.pointPlacement,m="between"===f||Jt(f),g=o.threshold,v=o.startFromThreshold?g:0,y=Number.MAX_VALUE,o=0;o<d;o++){var b=h[o],_=b.x,w=b.y;i=b.low;var x=s&&c.stacks[(this.negStacks&&w<(v?0:g)?"-":"")+this.stackKey];c.isLog&&null!==w&&w<=0&&(b.y=w=null,e(10)),b.plotX=t=T(ht(ct(-1e5,a.translate(_,0,0,0,1,f,"flags"===this.type)),1e5)),s&&this.visible&&!b.isNull&&x&&x[_]&&(r=this.getStackIndicator(r,_,this.index),x=x[_],w=x.points[r.key],i=w[0],w=w[1],i===v&&(i=Kt(g,c.min)),c.isLog&&i<=0&&(i=null),b.total=b.stackTotal=x.total,b.percentage=x.total&&b.y/x.total*100,b.stackY=w,x.setOffset(this.pointXOffset||0,this.barW||0)),b.yBottom=u(i)?c.translate(i,0,1,0,1):null,p&&(w=this.modifyValue(w,b)),b.plotY=i="number"==typeof w&&w!==1/0?ht(ct(-1e5,c.translate(w,0,1,0,1)),1e5):O,b.isInside=i!==O&&i>=0&&i<=c.len&&t>=0&&t<=a.len,b.clientX=m?a.translate(_,0,0,0,1):t,b.negative=b.y<(g||0),b.category=l&&l[b.x]!==O?l[b.x]:b.x,b.isNull||(void 0!==n&&(y=ht(y,dt(t-n))),n=t)}this.closestPointRangePx=y},getValidPoints:function(t,e){var i=this.chart;return Rt(t||this.points||[],function(t){return!(e&&!i.isInsidePlot(t.plotX,t.plotY,i.inverted))&&!t.isNull})},setClip:function(t){var e=this.chart,i=this.options,n=e.renderer,r=e.inverted,o=this.clipBox,s=o||e.clipBox,a=this.sharedClipKey||["_sharedClip",t&&t.duration,t&&t.easing,s.height,i.xAxis,i.yAxis].join(","),l=e[a],u=e[a+"m"];l||(t&&(s.width=0,e[a+"m"]=u=n.clipRect(-99,r?-e.plotLeft:-e.plotTop,99,r?e.chartWidth:e.chartHeight)),e[a]=l=n.clipRect(s)),t&&(l.count+=1),i.clip!==!1&&(this.group.clip(t||o?l:e.clipRect),this.markerGroup.clip(u),this.sharedClipKey=a),t||(l.count-=1,l.count<=0&&a&&e[a]&&(o||(e[a]=e[a].destroy()),e[a+"m"]&&(e[a+"m"]=e[a+"m"].destroy())))},animate:function(t){var e,i=this.chart,n=this.options.animation;n&&!s(n)&&(n=Zt[this.type].animation),t?this.setClip(n):(e=this.sharedClipKey,(t=i[e])&&t.animate({width:i.plotSizeX},n),i[e+"m"]&&i[e+"m"].animate({width:i.plotSizeX+99},n),this.animate=null)},afterAnimate:function(){this.setClip(),qt(this,"afterAnimate")},drawPoints:function(){var t,e,i,n,r,o,s,a,l,u,c,h,d=this.points,p=this.chart,f=this.options.marker,m=this.pointAttr[""],g=this.markerGroup,v=Kt(f.enabled,this.xAxis.isRadial,this.closestPointRangePx>2*f.radius);if(f.enabled!==!1||this._hasPointMarkers)for(n=d.length;n--;)r=d[n],e=lt(r.plotX),i=r.plotY,l=r.graphic,u=r.marker||{},c=!!r.marker,t=v&&u.enabled===O||u.enabled,h=r.isInside,t&&Jt(i)&&null!==r.y?(t=r.pointAttr[r.selected?"select":""]||m,o=t.r,s=Kt(u.symbol,this.symbol),a=0===s.indexOf("url"),l?l[h?"show":"hide"](!0).attr(t).animate(Xt({x:e-o,y:i-o},l.symbolName?{width:2*o,height:2*o}:{})):h&&(o>0||a)&&(r.graphic=p.renderer.symbol(s,e-o,i-o,2*o,2*o,c?u:f).attr(t).add(g))):l&&(r.graphic=l.destroy())},convertAttribs:function(t,e,i,n){var r,o,s=this.pointAttrToOptions,a={},t=t||{},e=e||{},i=i||{},n=n||{};for(r in s)o=s[r],a[r]=Kt(t[o],e[r],i[r],n[r]);return a},getAttribs:function(){var t,e,i,n=this,r=n.options,o=Zt[n.type].marker?r.marker:r,s=o.states,a=s.hover,l=n.color,c=n.options.negativeColor,h={stroke:l,fill:l},d=n.points||[],p=[],f=n.pointAttrToOptions;t=n.hasPointSpecificOptions;var m=o.lineColor,g=o.fillColor;e=r.turboThreshold;var v,y,b=n.zones,_=n.zoneAxis||"y";if(r.marker?(a.radius=a.radius||o.radius+a.radiusPlus,a.lineWidth=a.lineWidth||o.lineWidth+a.lineWidthPlus):(a.color=a.color||A(a.color||l).brighten(a.brightness).get(),a.negativeColor=a.negativeColor||A(a.negativeColor||c).brighten(a.brightness).get()),p[""]=n.convertAttribs(o,h),Ft(["hover","select"],function(t){p[t]=n.convertAttribs(s[t],p[""])}),n.pointAttr=p,l=d.length,!e||l<e||t)for(;l--;){if(e=d[l],(o=e.options&&e.options.marker||e.options)&&o.enabled===!1&&(o.radius=0),h=null,b.length){for(t=0,h=b[t];e[_]>=h.value;)h=b[++t];e.color=e.fillColor=h=Kt(h.color,n.color)}if(t=r.colorByPoint||e.color,e.options)for(y in f)u(o[f[y]])&&(t=!0);t?(o=o||{},i=[],s=o.states||{},t=s.hover=s.hover||{},r.marker&&(!e.negative||t.fillColor||a.fillColor)||(t[n.pointAttrToOptions.fill]=t.color||!e.options.color&&a[e.negative&&c?"negativeColor":"color"]||A(e.color).brighten(t.brightness||a.brightness).get()),v={color:e.color},g||(v.fillColor=e.color),m||(v.lineColor=e.color),o.hasOwnProperty("color")&&!o.color&&delete o.color,h&&!a.fillColor&&(t.fillColor=h),i[""]=n.convertAttribs(Xt(v,o),p[""]),i.hover=n.convertAttribs(s.hover,p.hover,i[""]),i.select=n.convertAttribs(s.select,p.select,i[""])):i=p,e.pointAttr=i}},destroy:function(){var t,e,i,n,r=this,o=r.chart,s=/AppleWebKit\/533/.test(vt),a=r.data||[];for(qt(r,"destroy"),$t(r),Ft(r.axisTypes||[],function(t){(n=r[t])&&(l(n.series,r),n.isDirty=n.forceRedraw=!0)}),r.legendItem&&r.chart.legend.destroyItem(r),t=a.length;t--;)(e=a[t])&&e.destroy&&e.destroy();r.points=null,clearTimeout(r.animationTimeout);for(i in r)r[i]instanceof E&&!r[i].survive&&(t=s&&"group"===i?"hide":"destroy",r[i][t]());o.hoverSeries===r&&(o.hoverSeries=null),l(o.series,r);for(i in r)delete r[i]},getGraphPath:function(t,e,i){var n,r,o=this,s=o.options,a=s.step,l=[],t=t||o.points;return(n=t.reversed)&&t.reverse(),(a={right:1,center:2}[a]||a&&3)&&n&&(a=4-a),s.connectNulls&&!e&&!i&&(t=this.getValidPoints(t)),Ft(t,function(n,c){var h=n.plotX,d=n.plotY,p=t[c-1];(n.leftCliff||p&&p.rightCliff)&&!i&&(r=!0),n.isNull&&!u(e)&&c>0?r=!s.connectNulls:n.isNull&&!e?r=!0:(0===c||r?p=["M",n.plotX,n.plotY]:o.getPointSpline?p=o.getPointSpline(t,n,c):a?(p=1===a?["L",p.plotX,d]:2===a?["L",(p.plotX+h)/2,p.plotY,"L",(p.plotX+h)/2,d]:["L",h,p.plotY],p.push("L",h,d)):p=["L",h,d],l.push.apply(l,p),r=!1)}),o.graphPath=l},drawGraph:function(){var t=this,e=this.options,i=[["graph",e.lineColor||this.color,e.dashStyle]],n=e.lineWidth,r="square"!==e.linecap,o=(this.gappedPath||this.getGraphPath).call(this),s=this.fillGraph&&this.color||"none";Ft(this.zones,function(n,r){i.push(["zoneGraph"+r,n.color||t.color,n.dashStyle||e.dashStyle])}),Ft(i,function(i,a){var l=i[0],u=t[l];u?u.animate({d:o}):(n||s)&&o.length&&(u={stroke:i[1],"stroke-width":n,fill:s,zIndex:1},i[2]?u.dashstyle=i[2]:r&&(u["stroke-linecap"]=u["stroke-linejoin"]="round"),t[l]=t.chart.renderer.path(o).attr(u).add(t.group).shadow(a<2&&e.shadow))})},applyZones:function(){var t,e,i,n,r,o,s,a=this,l=this.chart,u=l.renderer,c=this.zones,h=this.clips||[],d=this.graph,p=this.area,f=ct(l.chartWidth,l.chartHeight),m=this[(this.zoneAxis||"y")+"Axis"],g=m.reversed,v=l.inverted,y=m.horiz,b=!1;c.length&&(d||p)&&m.min!==O&&(d&&d.hide(),p&&p.hide(),n=m.getExtremes(),Ft(c,function(c,_){t=g?y?l.plotWidth:0:y?0:m.toPixels(n.min),t=ht(ct(Kt(e,t),0),f),e=ht(ct(at(m.toPixels(Kt(c.value,n.max),!0)),0),f),b&&(t=e=m.toPixels(n.max)),r=Math.abs(t-e),o=ht(t,e),s=ct(t,e),m.isXAxis?(i={x:v?s:o,y:0,width:r,height:f},y||(i.x=l.plotHeight-i.x)):(i={x:0,y:v?s:o,width:f,height:r},y&&(i.y=l.plotWidth-i.y)),l.inverted&&u.isVML&&(i=m.isXAxis?{x:0,y:g?o:s,height:i.width,width:l.chartWidth}:{x:i.y-l.plotLeft-l.spacingBox.x,y:0,width:i.height,height:l.chartHeight}),h[_]?h[_].animate(i):(h[_]=u.clipRect(i),d&&a["zoneGraph"+_].clip(h[_]),p&&a["zoneArea"+_].clip(h[_])),b=c.value>n.max}),this.clips=h)},invertGroups:function(){function t(){var t={width:e.yAxis.len,height:e.xAxis.len};Ft(["group","markerGroup"],function(i){e[i]&&e[i].attr(t).invert()})}var e=this,i=e.chart;e.xAxis&&(Bt(i,"resize",t),Bt(e,"destroy",function(){$t(i,"resize",t)}),t(),e.invertGroups=t)},plotGroup:function(t,e,i,n,r){var o=this[t],s=!o;return s&&(this[t]=o=this.chart.renderer.g(e).attr({zIndex:n||.1}).add(r),o.addClass("highcharts-series-"+this.index)),o.attr({visibility:i})[s?"attr":"animate"](this.getPlotBox()),o},getPlotBox:function(){var t=this.chart,e=this.xAxis,i=this.yAxis;return t.inverted&&(e=i,i=this.xAxis),{translateX:e?e.left:t.plotLeft,translateY:i?i.top:t.plotTop,scaleX:1,scaleY:1}},render:function(){var t,e=this,i=e.chart,n=e.options,r=!!e.animate&&i.renderer.isSVG&&D(n.animation).duration,o=e.visible?"inherit":"hidden",s=n.zIndex,a=e.hasRendered,l=i.seriesGroup;t=e.plotGroup("group","series",o,s,l),e.markerGroup=e.plotGroup("markerGroup","markers",o,s,l),r&&e.animate(!0),e.getAttribs(),t.inverted=!!e.isCartesian&&i.inverted,e.drawGraph&&(e.drawGraph(),e.applyZones()),Ft(e.points,function(t){t.redraw&&t.redraw()}),e.drawDataLabels&&e.drawDataLabels(),e.visible&&e.drawPoints(),e.drawTracker&&e.options.enableMouseTracking!==!1&&e.drawTracker(),i.inverted&&e.invertGroups(),n.clip!==!1&&!e.sharedClipKey&&!a&&t.clip(i.clipRect),r&&e.animate(),a||(e.animationTimeout=d(function(){e.afterAnimate()},r)),e.isDirty=e.isDirtyData=!1,e.hasRendered=!0},redraw:function(){var t=this.chart,e=this.isDirty||this.isDirtyData,i=this.group,n=this.xAxis,r=this.yAxis;i&&(t.inverted&&i.attr({width:t.plotWidth,height:t.plotHeight}),i.animate({translateX:Kt(n&&n.left,t.plotLeft),translateY:Kt(r&&r.top,t.plotTop)})),this.translate(),this.render(),e&&delete this.kdTree},kdDimensions:1,kdAxisArray:["clientX","plotY"],searchPoint:function(t,e){var i=this.xAxis,n=this.yAxis,r=this.chart.inverted;return this.searchKDTree({clientX:r?i.len-t.chartY+i.pos:t.chartX-i.pos,plotY:r?n.len-t.chartX+n.pos:t.chartY-n.pos},e)},buildKDTree:function(){function t(i,n,r){var o,s;if(s=i&&i.length)return o=e.kdAxisArray[n%r],i.sort(function(t,e){return t[o]-e[o]}),s=Math.floor(s/2),{point:i[s],left:t(i.slice(0,s),n+1,r),right:t(i.slice(s+1),n+1,r)}}var e=this,i=e.kdDimensions;delete e.kdTree,d(function(){e.kdTree=t(e.getValidPoints(null,!e.directTouch),i,i)},e.options.kdNow?0:1)},searchKDTree:function(t,e){function i(t,e,a,l){var c,h,d=e.point,p=n.kdAxisArray[a%l],f=d;return h=u(t[r])&&u(d[r])?Math.pow(t[r]-d[r],2):null,c=u(t[o])&&u(d[o])?Math.pow(t[o]-d[o],2):null,c=(h||0)+(c||0),d.dist=u(c)?Math.sqrt(c):Number.MAX_VALUE,d.distX=u(h)?Math.sqrt(h):Number.MAX_VALUE,p=t[p]-d[p],c=p<0?"left":"right",h=p<0?"right":"left",e[c]&&(c=i(t,e[c],a+1,l),f=c[s]<f[s]?c:d),e[h]&&Math.sqrt(p*p)<f[s]&&(t=i(t,e[h],a+1,l),f=t[s]<f[s]?t:f),f}var n=this,r=this.kdAxisArray[0],o=this.kdAxisArray[1],s=e?"distX":"dist";if(this.kdTree||this.buildKDTree(),this.kdTree)return i(t,this.kdTree,this.kdDimensions,this.kdDimensions)}},P.prototype={destroy:function(){C(this,this.axis)},render:function(t){var e=this.options,i=e.format,i=i?y(i,this):e.formatter.call(this);this.label?this.label.attr({text:i,visibility:"hidden"}):this.label=this.axis.chart.renderer.text(i,null,null,e.useHTML).css(e.style).attr({align:this.textAlign,rotation:e.rotation,visibility:"hidden"}).add(t)},setOffset:function(t,e){var i=this.axis,n=i.chart,r=n.inverted,o=i.reversed,o=this.isNegative&&!o||!this.isNegative&&o,s=i.translate(i.usePercentage?100:this.total,0,0,0,1),i=i.translate(0),i=dt(s-i),a=n.xAxis[0].translate(this.x)+t,l=n.plotHeight,o={x:r?o?s:s-i:a,y:r?l-a-e:o?l-s-i:l-s,width:r?i:e,height:r?e:i};(r=this.label)&&(r.align(this.alignOptions,null,o),o=r.alignAttr,r[this.options.crop===!1||n.isInsidePlot(o.x,o.y)?"show":"hide"](!0))}},fe.prototype.getStacks=function(){var t=this;Ft(t.yAxis,function(t){t.stacks&&t.hasVisibleSeries&&(t.oldStacks=t.stacks)}),Ft(t.series,function(e){!e.options.stacking||e.visible!==!0&&t.options.chart.ignoreHiddenSeries!==!1||(e.stackKey=e.type+Kt(e.options.stack,""))})},oe.prototype.buildStacks=function(){var t,e,i=this.series,n=Kt(this.options.reversedStacks,!0),r=i.length;
if(!this.isXAxis){for(this.usePercentage=!1,e=r;e--;)i[n?e:r-e-1].setStackedPoints();for(e=r;e--;)t=i[n?e:r-e-1],t.setStackCliffs&&t.setStackCliffs();if(this.usePercentage)for(e=0;e<r;e++)i[e].setPercentStacks()}},oe.prototype.renderStackTotals=function(){var t,e,i=this.chart,n=i.renderer,r=this.stacks,o=this.stackTotalGroup;o||(this.stackTotalGroup=o=n.g("stack-labels").attr({visibility:"visible",zIndex:6}).add()),o.translate(i.plotLeft,i.plotTop);for(t in r)for(e in i=r[t])i[e].render(o)},oe.prototype.resetStacks=function(){var t,e,i=this.stacks;if(!this.isXAxis)for(t in i)for(e in i[t])i[t][e].touched<this.stacksTouched?(i[t][e].destroy(),delete i[t][e]):(i[t][e].total=null,i[t][e].cum=0)},oe.prototype.cleanStacks=function(){var t,e,i;if(!this.isXAxis){this.oldStacks&&(t=this.stacks=this.oldStacks);for(e in t)for(i in t[e])t[e][i].cum=t[e][i].total}},ge.prototype.setStackedPoints=function(){if(this.options.stacking&&(this.visible===!0||this.chart.options.chart.ignoreHiddenSeries===!1)){var t,e,i,n,r,o,s,a=this.processedXData,l=this.processedYData,u=[],c=l.length,h=this.options,d=h.threshold,p=h.startFromThreshold?d:0,f=h.stack,h=h.stacking,m=this.stackKey,g="-"+m,v=this.negStacks,y=this.yAxis,b=y.stacks,_=y.oldStacks;for(y.stacksTouched+=1,r=0;r<c;r++)o=a[r],s=l[r],t=this.getStackIndicator(t,o,this.index),n=t.key,i=(e=v&&s<(p?0:d))?g:m,b[i]||(b[i]={}),b[i][o]||(_[i]&&_[i][o]?(b[i][o]=_[i][o],b[i][o].total=null):b[i][o]=new P(y,y.options.stackLabels,e,o,f)),i=b[i][o],null!==s&&(i.points[n]=i.points[this.index]=[Kt(i.cum,p)],i.touched=y.stacksTouched,t.index>0&&this.singleStacks===!1&&(i.points[n][0]=i.points[this.index+","+o+",0"][0])),"percent"===h?(e=e?m:g,v&&b[e]&&b[e][o]?(e=b[e][o],i.total=e.total=ct(e.total,i.total)+dt(s)||0):i.total=T(i.total+(dt(s)||0))):i.total=T(i.total+(s||0)),i.cum=Kt(i.cum,p)+(s||0),null!==s&&(i.points[n].push(i.cum),u[r]=i.cum);"percent"===h&&(y.usePercentage=!0),this.stackedYData=u,y.oldStacks={}}},ge.prototype.setPercentStacks=function(){var t,e=this,i=e.stackKey,n=e.yAxis.stacks,r=e.processedXData;Ft([i,"-"+i],function(i){for(var o,s,a,l=r.length;l--;)s=r[l],t=e.getStackIndicator(t,s,e.index),o=(a=n[i]&&n[i][s])&&a.points[t.key],(s=o)&&(a=a.total?100/a.total:0,s[0]=T(s[0]*a),s[1]=T(s[1]*a),e.stackedYData[l]=s[1])})},ge.prototype.getStackIndicator=function(t,e,i){return u(t)&&t.x===e?t.index++:t={x:e,index:0},t.key=[i,e,t.index].join(","),t},Xt(fe.prototype,{addSeries:function(t,e,i){var n,r=this;return t&&(e=Kt(e,!0),qt(r,"addSeries",{options:t},function(){n=r.initSeries(t),r.isDirtyLegend=!0,r.linkSeries(),e&&r.redraw(i)})),n},addAxis:function(t,e,i,r){var o=e?"xAxis":"yAxis",s=this.options,t=n(t,{index:this[o].length,isX:e});new oe(this,t),s[o]=h(s[o]||{}),s[o].push(t),Kt(i,!0)&&this.redraw(r)},showLoading:function(t){var e=this,i=e.options,n=e.loadingDiv,r=i.loading,o=function(){n&&p(n,{left:e.plotLeft+"px",top:e.plotTop+"px",width:e.plotWidth+"px",height:e.plotHeight+"px"})};n||(e.loadingDiv=n=f(Pt,{className:"highcharts-loading"},Xt(r.style,{zIndex:10,display:"none"}),e.container),e.loadingSpan=f("span",null,r.labelStyle,n),Bt(e,"redraw",o)),e.loadingSpan.innerHTML=t||i.lang.loading,e.loadingShown||(p(n,{opacity:0,display:""}),Ut(n,{opacity:r.style.opacity},{duration:r.showDuration||0}),e.loadingShown=!0),o()},hideLoading:function(){var t=this.options,e=this.loadingDiv;e&&Ut(e,{opacity:0},{duration:t.loading.hideDuration||100,complete:function(){p(e,{display:"none"})}}),this.loadingShown=!1}}),Xt(me.prototype,{update:function(t,e,i,n){function r(){l.applyOptions(t),null===l.y&&c&&(l.graphic=c.destroy()),s(t)&&!a(t)&&(l.redraw=function(){c&&c.element&&t&&t.marker&&t.marker.symbol&&(l.graphic=c.destroy()),t&&t.dataLabels&&l.dataLabel&&(l.dataLabel=l.dataLabel.destroy()),l.redraw=null}),o=l.index,u.updateParallelArrays(l,o),p&&l.name&&(p[l.x]=l.name),d.data[o]=s(d.data[o])&&!a(d.data[o])?l.options:t,u.isDirty=u.isDirtyData=!0,!u.fixedBox&&u.hasCartesianSeries&&(h.isDirtyBox=!0),"point"===d.legendType&&(h.isDirtyLegend=!0),e&&h.redraw(i)}var o,l=this,u=l.series,c=l.graphic,h=u.chart,d=u.options,p=u.xAxis&&u.xAxis.names,e=Kt(e,!0);n===!1?r():l.firePointEvent("update",{options:t},r)},remove:function(t,e){this.series.removePoint(Ht(this,this.series.data),t,e)}}),Xt(ge.prototype,{addPoint:function(t,e,i,n){var r,o=this,s=o.options,a=o.data,l=o.graph,u=o.area,c=o.chart,h=o.xAxis&&o.xAxis.names,d=l&&l.shift||0,p=["graph","area"],l=s.data,f=o.xData;if(S(n,c),i){for(n=o.zones.length;n--;)p.push("zoneGraph"+n,"zoneArea"+n);Ft(p,function(t){o[t]&&(o[t].shift=d+(s.step?2:1))})}if(u&&(u.isArea=!0),e=Kt(e,!0),u={series:o},o.pointClass.prototype.applyOptions.apply(u,[t]),p=u.x,n=f.length,o.requireSorting&&p<f[n-1])for(r=!0;n&&f[n-1]>p;)n--;o.updateParallelArrays(u,"splice",n,0,0),o.updateParallelArrays(u,n),h&&u.name&&(h[p]=u.name),l.splice(n,0,t),r&&(o.data.splice(n,0,null),o.processData()),"point"===s.legendType&&o.generatePoints(),i&&(a[0]&&a[0].remove?a[0].remove(!1):(a.shift(),o.updateParallelArrays(u,"shift"),l.shift())),o.isDirty=!0,o.isDirtyData=!0,e&&(o.getAttribs(),c.redraw())},removePoint:function(t,e,i){var n=this,r=n.data,o=r[t],s=n.points,a=n.chart,l=function(){s&&s.length===r.length&&s.splice(t,1),r.splice(t,1),n.options.data.splice(t,1),n.updateParallelArrays(o||{series:n},"splice",t,1),o&&o.destroy(),n.isDirty=!0,n.isDirtyData=!0,e&&a.redraw()};S(i,a),e=Kt(e,!0),o?o.firePointEvent("remove",null,l):l()},remove:function(t,e){var i=this,n=i.chart;qt(i,"remove",null,function(){i.destroy(),n.isDirtyLegend=n.isDirtyBox=!0,n.linkSeries(),Kt(t,!0)&&n.redraw(e)})},update:function(t,e){var i,r=this,o=this.chart,s=this.userOptions,a=this.type,l=Nt[a].prototype,u=["group","markerGroup","dataLabelsGroup"];(t.type&&t.type!==a||void 0!==t.zIndex)&&(u.length=0),Ft(u,function(t){u[t]=r[t],delete r[t]}),t=n(s,{animation:!1,index:this.index,pointStart:this.xData[0]},{data:this.options.data},t),this.remove(!1);for(i in l)this[i]=O;Xt(this,Nt[t.type||a].prototype),Ft(u,function(t){r[t]=u[t]}),this.init(o,t),o.linkSeries(),Kt(e,!0)&&o.redraw(!1)}}),Xt(oe.prototype,{update:function(t,e){var i=this.chart,t=i.options[this.coll][this.options.index]=n(this.userOptions,t);this.destroy(!0),this._addedPlotLB=this.chart._labelPanes=O,this.init(i,Xt(t,{events:O})),i.isDirtyBox=!0,Kt(e,!0)&&i.redraw()},remove:function(t){for(var e=this.chart,i=this.coll,n=this.series,r=n.length;r--;)n[r]&&n[r].remove(!1);l(e.axes,this),l(e[i],this),e.options[i].splice(this.options.index,1),Ft(e[i],function(t,e){t.options.index=e}),this.destroy(),e.isDirtyBox=!0,Kt(t,!0)&&e.redraw()},setTitle:function(t,e){this.update({title:t},e)},setCategories:function(t,e){this.update({categories:t},e)}});var ve=m(ge);Nt.line=ve,Zt.area=n(te,{softThreshold:!1,threshold:0});var ye=m(ge,{type:"area",singleStacks:!1,getStackPoints:function(){var t,e,i,n=[],r=[],o=this.xAxis,s=this.yAxis,a=s.stacks[this.stackKey],l={},u=this.points,c=this.index,h=s.series,d=h.length,p=Kt(s.options.reversedStacks,!0)?1:-1;if(this.options.stacking){for(e=0;e<u.length;e++)l[u[e].x]=u[e];for(i in a)null!==a[i].total&&r.push(i);r.sort(function(t,e){return t-e}),t=zt(h,function(){return this.visible}),Ft(r,function(i,u){var h,f,m=0;if(l[i]&&!l[i].isNull)n.push(l[i]),Ft([-1,1],function(n){var o=1===n?"rightNull":"leftNull",s=0,m=a[r[u+n]];if(m)for(e=c;e>=0&&e<d;)h=m.points[e],h||(e===c?l[i][o]=!0:t[e]&&(f=a[i].points[e])&&(s-=f[1]-f[0])),e+=p;l[i][1===n?"rightCliff":"leftCliff"]=s});else{for(e=c;e>=0&&e<d;){if(h=a[i].points[e]){m=h[1];break}e+=p}m=s.toPixels(m,!0),n.push({isNull:!0,plotX:o.toPixels(i,!0),plotY:m,yBottom:m})}})}return n},getGraphPath:function(t){var e,i,n,r,o=ge.prototype.getGraphPath,s=this.options,a=s.stacking,l=this.yAxis,u=[],c=[],h=this.index,d=l.stacks[this.stackKey],p=s.threshold,f=l.getThreshold(s.threshold),s=s.connectNulls||"percent"===a,m=function(e,i,r){var o,s,m=t[e],e=a&&d[m.x].points[h],g=m[r+"Null"]||0,r=m[r+"Cliff"]||0,m=!0;r||g?(o=(g?e[0]:e[1])+r,s=e[0]+r,m=!!g):!a&&t[i]&&t[i].isNull&&(o=s=p),void 0!==o&&(c.push({plotX:n,plotY:null===o?f:l.getThreshold(o),isNull:m}),u.push({plotX:n,plotY:null===s?f:l.getThreshold(s)}))},t=t||this.points;for(a&&(t=this.getStackPoints()),e=0;e<t.length;e++)i=t[e].isNull,n=Kt(t[e].rectPlotX,t[e].plotX),r=Kt(t[e].yBottom,f),(!i||s)&&(s||m(e,e-1,"left"),i&&!a&&s||(c.push(t[e]),u.push({x:e,plotX:n,plotY:r})),s||m(e,e+1,"right"));return e=o.call(this,c,!0,!0),u.reversed=!0,i=o.call(this,u,!0,!0),i.length&&(i[0]="L"),e=e.concat(i),o=o.call(this,c,!1,s),this.areaPath=e,o},drawGraph:function(){this.areaPath=[],ge.prototype.drawGraph.apply(this);var t=this,e=this.areaPath,i=this.options,n=[["area",this.color,i.fillColor]];Ft(this.zones,function(e,r){n.push(["zoneArea"+r,e.color||t.color,e.fillColor||i.fillColor])}),Ft(n,function(n){var r=n[0],o=t[r];o?o.animate({d:e}):(o={fill:n[2]||n[1],zIndex:0},n[2]||(o["fill-opacity"]=Kt(i.fillOpacity,.75)),t[r]=t.chart.renderer.path(e).attr(o).add(t.group))})},drawLegendSymbol:ie.drawRectangle});return Nt.area=ye,Zt.spline=n(te),ve=m(ge,{type:"spline",getPointSpline:function(t,e,i){var n,r,o,s,a=e.plotX,l=e.plotY,u=t[i-1],i=t[i+1];if(u&&!u.isNull&&i&&!i.isNull){t=u.plotY,o=i.plotX;var i=i.plotY,c=0;n=(1.5*a+u.plotX)/2.5,r=(1.5*l+t)/2.5,o=(1.5*a+o)/2.5,s=(1.5*l+i)/2.5,o!==n&&(c=(s-r)*(o-a)/(o-n)+l-s),r+=c,s+=c,r>t&&r>l?(r=ct(t,l),s=2*l-r):r<t&&r<l&&(r=ht(t,l),s=2*l-r),s>i&&s>l?(s=ct(i,l),r=2*l-s):s<i&&s<l&&(s=ht(i,l),r=2*l-s),e.rightContX=o,e.rightContY=s}return e=["C",Kt(u.rightContX,u.plotX),Kt(u.rightContY,u.plotY),Kt(n,a),Kt(r,l),a,l],u.rightContX=u.rightContY=null,e}}),Nt.spline=ve,Zt.areaspline=n(Zt.area),ye=ye.prototype,ve=m(ve,{type:"areaspline",getStackPoints:ye.getStackPoints,getGraphPath:ye.getGraphPath,setStackCliffs:ye.setStackCliffs,drawGraph:ye.drawGraph,drawLegendSymbol:ie.drawRectangle}),Nt.areaspline=ve,Zt.column=n(te,{borderColor:"#FFFFFF",borderRadius:0,groupPadding:.2,marker:null,pointPadding:.1,minPointLength:0,cropThreshold:50,pointRange:null,states:{hover:{brightness:.1,shadow:!1,halo:!1},select:{color:"#C0C0C0",borderColor:"#000000",shadow:!1}},dataLabels:{align:null,verticalAlign:null,y:null},softThreshold:!1,startFromThreshold:!0,stickyTracking:!1,tooltip:{distance:6},threshold:0}),ve=m(ge,{type:"column",pointAttrToOptions:{stroke:"borderColor",fill:"color",r:"borderRadius"},cropShoulder:0,directTouch:!0,trackerGroups:["group","dataLabelsGroup"],negStacks:!0,init:function(){ge.prototype.init.apply(this,arguments);var t=this,e=t.chart;e.hasRendered&&Ft(e.series,function(e){e.type===t.type&&(e.isDirty=!0)})},getColumnMetrics:function(){var t,e=this,i=e.options,n=e.xAxis,r=e.yAxis,o=n.reversed,s={},a=0;i.grouping===!1?a=1:Ft(e.chart.series,function(i){var n,o=i.options,l=i.yAxis;i.type===e.type&&i.visible&&r.len===l.len&&r.pos===l.pos&&(o.stacking?(t=i.stackKey,s[t]===O&&(s[t]=a++),n=s[t]):o.grouping!==!1&&(n=a++),i.columnIndex=n)});var l=ht(dt(n.transA)*(n.ordinalSlope||i.pointRange||n.closestPointRange||n.tickInterval||1),n.len),u=l*i.groupPadding,c=(l-2*u)/a,i=ht(i.maxPointWidth||n.len,Kt(i.pointWidth,c*(1-2*i.pointPadding)));return e.columnMetrics={width:i,offset:(c-i)/2+(u+((e.columnIndex||0)+(o?1:0))*c-l/2)*(o?-1:1)},e.columnMetrics},crispCol:function(t,e,i,n){var r=this.chart,o=this.borderWidth,s=-(o%2?.5:0),o=o%2?.5:1;return r.inverted&&r.renderer.isVML&&(o+=1),i=Math.round(t+i)+s,t=Math.round(t)+s,i-=t,n=Math.round(e+n)+o,s=dt(e)<=.5&&n>.5,e=Math.round(e)+o,n-=e,s&&n&&(e-=1,n+=1),{x:t,y:e,width:i,height:n}},translate:function(){var t=this,e=t.chart,i=t.options,n=t.borderWidth=Kt(i.borderWidth,t.closestPointRange*t.xAxis.transA<2?0:1),r=t.yAxis,o=t.translatedThreshold=r.getThreshold(i.threshold),s=Kt(i.minPointLength,5),a=t.getColumnMetrics(),l=a.width,u=t.barW=ct(l,1+2*n),c=t.pointXOffset=a.offset;e.inverted&&(o-=.5),i.pointPadding&&(u=ut(u)),ge.prototype.translate.apply(t),Ft(t.points,function(i){var n,a=ht(Kt(i.yBottom,o),9e4),h=999+dt(a),h=ht(ct(-h,i.plotY),r.len+h),d=i.plotX+c,p=u,f=ht(h,a),m=ct(h,a)-f;dt(m)<s&&s&&(m=s,n=!r.reversed&&!i.negative||r.reversed&&i.negative,f=dt(f-o)>s?a-s:o-(n?s:0)),i.barX=d,i.pointWidth=l,i.tooltipPos=e.inverted?[r.len+r.pos-e.plotLeft-h,t.xAxis.len-d-p/2,m]:[d+p/2,h+r.pos-e.plotTop,m],i.shapeType="rect",i.shapeArgs=t.crispCol(d,f,p,m)})},getSymbol:At,drawLegendSymbol:ie.drawRectangle,drawGraph:At,drawPoints:function(){var t,e,i=this,r=this.chart,o=i.options,s=r.renderer,a=o.animationLimit||250;Ft(i.points,function(l){var c,h=l.graphic;Jt(l.plotY)&&null!==l.y?(t=l.shapeArgs,c=u(i.borderWidth)?{"stroke-width":i.borderWidth}:{},e=l.pointAttr[l.selected?"select":""]||i.pointAttr[""],h?(Vt(h),h.attr(c).attr(e)[r.pointCount<a?"animate":"attr"](n(t))):l.graphic=s[l.shapeType](t).attr(c).attr(e).add(l.group||i.group).shadow(o.shadow,null,o.stacking&&!o.borderRadius)):h&&(l.graphic=h.destroy())})},animate:function(t){var e=this,i=this.yAxis,n=e.options,r=this.chart.inverted,o={};Mt&&(t?(o.scaleY=.001,t=ht(i.pos+i.len,ct(i.pos,i.toPixels(n.threshold))),r?o.translateX=t-i.len:o.translateY=t,e.group.attr(o)):(o[r?"translateX":"translateY"]=i.pos,e.group.animate(o,Xt(D(e.options.animation),{step:function(t,i){e.group.attr({scaleY:ct(.001,i.pos)})}})),e.animate=null))},remove:function(){var t=this,e=t.chart;e.hasRendered&&Ft(e.series,function(e){e.type===t.type&&(e.isDirty=!0)}),ge.prototype.remove.apply(t,arguments)}}),Nt.column=ve,Zt.bar=n(Zt.column),ye=m(ve,{type:"bar",inverted:!0}),Nt.bar=ye,Zt.scatter=n(te,{lineWidth:0,marker:{enabled:!0},tooltip:{headerFormat:'<span style="color:{point.color}">\u25cf</span> <span style="font-size: 10px;"> {series.name}</span><br/>',pointFormat:"x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>"}}),ye=m(ge,{type:"scatter",sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","markerGroup","dataLabelsGroup"],takeOrdinalPosition:!1,kdDimensions:2,drawGraph:function(){this.options.lineWidth&&ge.prototype.drawGraph.call(this)}}),Nt.scatter=ye,Zt.pie=n(te,{borderColor:"#FFFFFF",borderWidth:1,center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{distance:30,enabled:!0,formatter:function(){return null===this.y?void 0:this.point.name},x:0},ignoreHiddenPoint:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,states:{hover:{brightness:.1,shadow:!1}},stickyTracking:!1,tooltip:{followPointer:!0}}),te={type:"pie",isCartesian:!1,pointClass:m(me,{init:function(){me.prototype.init.apply(this,arguments);var t,e=this;return e.name=Kt(e.name,"Slice"),t=function(t){e.slice("select"===t.type)},Bt(e,"select",t),Bt(e,"unselect",t),e},setVisible:function(t,e){var i=this,n=i.series,r=n.chart,o=n.options.ignoreHiddenPoint,e=Kt(e,o);t!==i.visible&&(i.visible=i.options.visible=t=t===O?!i.visible:t,n.options.data[Ht(i,n.data)]=i.options,Ft(["graphic","dataLabel","connector","shadowGroup"],function(e){i[e]&&i[e][t?"show":"hide"](!0)}),i.legendItem&&r.legend.colorizeItem(i,t),!t&&"hover"===i.state&&i.setState(""),o&&(n.isDirty=!0),e&&r.redraw())},slice:function(t,e,i){var n=this.series;S(i,n.chart),Kt(e,!0),this.sliced=this.options.sliced=t=u(t)?t:!this.sliced,n.options.data[Ht(this,n.data)]=this.options,t=t?this.slicedTranslation:{translateX:0,translateY:0},this.graphic.animate(t),this.shadowGroup&&this.shadowGroup.animate(t)},haloPath:function(t){var e=this.shapeArgs,i=this.series.chart;return this.sliced||!this.visible?[]:this.series.chart.renderer.symbols.arc(i.plotLeft+e.x,i.plotTop+e.y,e.r+t,e.r+t,{innerR:this.shapeArgs.r,start:e.start,end:e.end})}}),requireSorting:!1,directTouch:!0,noSharedTooltip:!0,trackerGroups:["group","dataLabelsGroup"],axisTypes:[],pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color"},animate:function(t){var e=this,i=e.points,n=e.startAngleRad;t||(Ft(i,function(t){var i=t.graphic,r=t.shapeArgs;i&&(i.attr({r:t.startR||e.center[3]/2,start:n,end:n}),i.animate({r:r.r,start:r.start,end:r.end},e.options.animation))}),e.animate=null)},updateTotals:function(){var t,e,i=0,n=this.points,r=n.length,o=this.options.ignoreHiddenPoint;for(t=0;t<r;t++)e=n[t],i+=o&&!e.visible?0:e.y;for(this.total=i,t=0;t<r;t++)e=n[t],e.percentage=i>0&&(e.visible||!o)?e.y/i*100:0,e.total=i},generatePoints:function(){ge.prototype.generatePoints.call(this),this.updateTotals()},translate:function(t){this.generatePoints();var e,i,n,r,o,s=0,a=this.options,l=a.slicedOffset,u=l+a.borderWidth,c=a.startAngle||0,h=this.startAngleRad=mt/180*(c-90),c=(this.endAngleRad=mt/180*(Kt(a.endAngle,c+360)-90))-h,d=this.points,p=a.dataLabels.distance,a=a.ignoreHiddenPoint,f=d.length;for(t||(this.center=t=this.getCenter()),this.getX=function(e,i){return n=st.asin(ht((e-t[1])/(t[2]/2+p),1)),t[0]+(i?-1:1)*pt(n)*(t[2]/2+p)},r=0;r<f;r++)o=d[r],e=h+s*c,a&&!o.visible||(s+=o.percentage/100),i=h+s*c,o.shapeType="arc",o.shapeArgs={x:t[0],y:t[1],r:t[2]/2,innerR:t[3]/2,start:at(1e3*e)/1e3,end:at(1e3*i)/1e3},n=(i+e)/2,n>1.5*mt?n-=2*mt:n<-mt/2&&(n+=2*mt),o.slicedTranslation={translateX:at(pt(n)*l),translateY:at(ft(n)*l)},e=pt(n)*t[2]/2,i=ft(n)*t[2]/2,o.tooltipPos=[t[0]+.7*e,t[1]+.7*i],o.half=n<-mt/2||n>mt/2?1:0,o.angle=n,u=ht(u,p/2),o.labelPos=[t[0]+e+pt(n)*p,t[1]+i+ft(n)*p,t[0]+e+pt(n)*u,t[1]+i+ft(n)*u,t[0]+e,t[1]+i,p<0?"center":o.half?"right":"left",n]},drawGraph:null,drawPoints:function(){var t,e,i,n,r,o,s=this,a=s.chart.renderer,l=s.options.shadow;l&&!s.shadowGroup&&(s.shadowGroup=a.g("shadow").add(s.group)),Ft(s.points,function(u){null!==u.y&&(e=u.graphic,r=u.shapeArgs,i=u.shadowGroup,n=u.pointAttr[u.selected?"select":""],n.stroke||(n.stroke=n.fill),l&&!i&&(i=u.shadowGroup=a.g("shadow").add(s.shadowGroup)),t=u.sliced?u.slicedTranslation:{translateX:0,translateY:0},i&&i.attr(t),e?e.setRadialReference(s.center).attr(n).animate(Xt(r,t)):(o={"stroke-linejoin":"round"},u.visible||(o.visibility="hidden"),u.graphic=e=a[u.shapeType](r).setRadialReference(s.center).attr(n).attr(o).attr(t).add(s.group).shadow(l,i)))})},searchPoint:At,sortByAngle:function(t,e){t.sort(function(t,i){return void 0!==t.angle&&(i.angle-t.angle)*e})},drawLegendSymbol:ie.drawRectangle,getCenter:ne.getCenter,getSymbol:At},te=m(ge,te),Nt.pie=te,ge.prototype.drawDataLabels=function(){var t,e,i,r,o=this,s=o.options,a=s.cursor,l=s.dataLabels,c=o.points,h=o.hasRendered||0,d=Kt(l.defer,!0),p=o.chart.renderer;(l.enabled||o._hasPointLabels)&&(o.dlProcessOptions&&o.dlProcessOptions(l),r=o.plotGroup("dataLabelsGroup","data-labels",d&&!h?"hidden":"visible",l.zIndex||6),d&&(r.attr({opacity:+h}),h||Bt(o,"afterAnimate",function(){o.visible&&r.show(),r[s.animation?"animate":"attr"]({opacity:1},{duration:200})})),e=l,Ft(c,function(c){var h,d,f,m,g=c.dataLabel,v=c.connector,b=!0,_={};if(t=c.dlOptions||c.options&&c.options.dataLabels,h=Kt(t&&t.enabled,e.enabled)&&null!==c.y,g&&!h)c.dataLabel=g.destroy();else if(h){if(l=n(e,t),m=l.style,h=l.rotation,d=c.getLabelConfig(),i=l.format?y(l.format,d):l.formatter.call(d,l),m.color=Kt(l.color,m.color,o.color,"black"),g)u(i)?(g.attr({text:i}),b=!1):(c.dataLabel=g=g.destroy(),v&&(c.connector=v.destroy()));else if(u(i)){g={fill:l.backgroundColor,stroke:l.borderColor,"stroke-width":l.borderWidth,r:l.borderRadius||0,rotation:h,padding:l.padding,zIndex:1},"contrast"===m.color&&(_.color=l.inside||l.distance<0||s.stacking?p.getContrast(c.color||o.color):"#000000"),a&&(_.cursor=a);for(f in g)g[f]===O&&delete g[f];g=c.dataLabel=p[h?"text":"label"](i,0,-9999,l.shape,null,null,l.useHTML).attr(g).css(Xt(m,_)).add(r).shadow(l.shadow)}g&&o.alignDataLabel(c,g,l,null,b)}}))},ge.prototype.alignDataLabel=function(t,e,i,n,r){var o=this.chart,s=o.inverted,a=Kt(t.plotX,-9999),l=Kt(t.plotY,-9999),u=e.getBBox(),c=o.renderer.fontMetrics(i.style.fontSize).b,h=i.rotation,d=i.align,p=this.visible&&(t.series.forceDL||o.isInsidePlot(a,at(l),s)||n&&o.isInsidePlot(a,s?n.x+1:n.y+n.height-1,s)),f="justify"===Kt(i.overflow,"justify");p&&(n=Xt({x:s?o.plotWidth-l:a,y:at(s?o.plotHeight-a:l),width:0,height:0},n),Xt(i,{width:u.width,height:u.height}),h?(f=!1,s=o.renderer.rotCorr(c,h),s={x:n.x+i.x+n.width/2+s.x,y:n.y+i.y+{top:0,middle:.5,bottom:1}[i.verticalAlign]*n.height},e[r?"attr":"animate"](s).attr({align:d}),a=(h+720)%360,a=a>180&&a<360,"left"===d?s.y-=a?u.height:0:"center"===d?(s.x-=u.width/2,s.y-=u.height/2):"right"===d&&(s.x-=u.width,s.y-=a?0:u.height)):(e.align(i,null,n),s=e.alignAttr),f?this.justifyDataLabel(e,i,s,u,n,r):Kt(i.crop,!0)&&(p=o.isInsidePlot(s.x,s.y)&&o.isInsidePlot(s.x+u.width,s.y+u.height)),i.shape&&!h&&e.attr({anchorX:t.plotX,anchorY:t.plotY})),p||(Vt(e),e.attr({y:-9999}),e.placed=!1)},ge.prototype.justifyDataLabel=function(t,e,i,n,r,o){var s,a,l=this.chart,u=e.align,c=e.verticalAlign,h=t.box?0:t.padding||0;s=i.x+h,s<0&&("right"===u?e.align="left":e.x=-s,a=!0),s=i.x+n.width-h,s>l.plotWidth&&("left"===u?e.align="right":e.x=l.plotWidth-s,a=!0),s=i.y+h,s<0&&("bottom"===c?e.verticalAlign="top":e.y=-s,a=!0),s=i.y+n.height-h,s>l.plotHeight&&("top"===c?e.verticalAlign="bottom":e.y=l.plotHeight-s,a=!0),a&&(t.placed=!o,t.align(e,null,r))},Nt.pie&&(Nt.pie.prototype.drawDataLabels=function(){var t,e,i,n,r,o,s,a,l,u,c,h=this,d=h.data,p=h.chart,f=h.options.dataLabels,m=Kt(f.connectorPadding,10),g=Kt(f.connectorWidth,1),v=p.plotWidth,y=p.plotHeight,b=Kt(f.softConnector,!0),_=f.distance,w=h.center,x=w[2]/2,C=w[1],M=_>0,T=[[],[]],S=[0,0,0,0],D=function(t,e){return e.y-t.y};if(h.visible&&(f.enabled||h._hasPointLabels)){for(ge.prototype.drawDataLabels.apply(h),Ft(d,function(t){t.dataLabel&&t.visible&&(T[t.half].push(t),t.dataLabel._pos=null)}),u=2;u--;){var L,A=[],E=[],I=T[u],P=I.length;if(P){for(h.sortByAngle(I,u-.5),c=d=0;!d&&I[c];)d=I[c]&&I[c].dataLabel&&(I[c].dataLabel.getBBox().height||21),c++;if(_>0){for(r=ht(C+x+_,p.plotHeight),c=ct(0,C-x-_);c<=r;c+=d)A.push(c);if(r=A.length,P>r){for(t=[].concat(I),t.sort(D),c=P;c--;)t[c].rank=c;for(c=P;c--;)I[c].rank>=r&&I.splice(c,1);P=I.length}for(c=0;c<P;c++){t=I[c],o=t.labelPos,t=9999;var O,j;for(j=0;j<r;j++)O=dt(A[j]-o[1]),O<t&&(t=O,L=j);if(L<c&&null!==A[c])L=c;else for(r<P-c+L&&null!==A[c]&&(L=r-P+c);null===A[L];)L++;E.push({i:L,y:A[L]}),A[L]=null}E.sort(D)}for(c=0;c<P;c++)t=I[c],o=t.labelPos,n=t.dataLabel,l=t.visible===!1?"hidden":"inherit",t=o[1],_>0?(r=E.pop(),L=r.i,a=r.y,(t>a&&null!==A[L+1]||t<a&&null!==A[L-1])&&(a=ht(ct(0,t),p.plotHeight))):a=t,s=f.justify?w[0]+(u?-1:1)*(x+_):h.getX(a===C-x-_||a===C+x+_?t:a,u),n._attr={visibility:l,align:o[6]},n._pos={x:s+f.x+({left:m,right:-m}[o[6]]||0),y:a+f.y-10},n.connX=s,n.connY=a,null===this.options.size&&(r=n.width,s-r<m?S[3]=ct(at(r-s+m),S[3]):s+r>v-m&&(S[1]=ct(at(s+r-v+m),S[1])),a-d/2<0?S[0]=ct(at(-a+d/2),S[0]):a+d/2>y&&(S[2]=ct(at(a+d/2-y),S[2])))}}(0===k(S)||this.verifyDataLabelOverflow(S))&&(this.placeDataLabels(),M&&g&&Ft(this.points,function(t){e=t.connector,o=t.labelPos,(n=t.dataLabel)&&n._pos&&t.visible?(l=n._attr.visibility,s=n.connX,a=n.connY,i=b?["M",s+("left"===o[6]?5:-5),a,"C",s,a,2*o[2]-o[4],2*o[3]-o[5],o[2],o[3],"L",o[4],o[5]]:["M",s+("left"===o[6]?5:-5),a,"L",o[2],o[3],"L",o[4],o[5]],e?(e.animate({d:i}),e.attr("visibility",l)):t.connector=e=h.chart.renderer.path(i).attr({"stroke-width":g,stroke:f.connectorColor||t.color||"#606060",visibility:l}).add(h.dataLabelsGroup)):e&&(t.connector=e.destroy())}))}},Nt.pie.prototype.placeDataLabels=function(){Ft(this.points,function(t){var e=t.dataLabel;e&&t.visible&&((t=e._pos)?(e.attr(e._attr),e[e.moved?"animate":"attr"](t),e.moved=!0):e&&e.attr({y:-9999}))})},Nt.pie.prototype.alignDataLabel=At,Nt.pie.prototype.verifyDataLabelOverflow=function(t){var e,i=this.center,n=this.options,r=n.center,o=n.minSize||80,s=o;return null!==r[0]?s=ct(i[2]-ct(t[1],t[3]),o):(s=ct(i[2]-t[1]-t[3],o),i[0]+=(t[3]-t[1])/2),null!==r[1]?s=ct(ht(s,i[2]-ct(t[0],t[2])),o):(s=ct(ht(s,i[2]-t[0]-t[2]),o),i[1]+=(t[0]-t[2])/2),s<i[2]?(i[2]=s,i[3]=Math.min(/%$/.test(n.innerSize||0)?s*parseFloat(n.innerSize||0)/100:parseFloat(n.innerSize||0),s),this.translate(i),this.drawDataLabels&&this.drawDataLabels()):e=!0,e}),Nt.column&&(Nt.column.prototype.alignDataLabel=function(t,e,i,r,o){var s=this.chart.inverted,a=t.series,l=t.dlBox||t.shapeArgs,u=Kt(t.below,t.plotY>Kt(this.translatedThreshold,a.yAxis.len)),c=Kt(i.inside,!!this.options.stacking);l&&(r=n(l),r.y<0&&(r.height+=r.y,r.y=0),l=r.y+r.height-a.yAxis.len,l>0&&(r.height-=l),s&&(r={x:a.yAxis.len-r.y-r.height,y:a.xAxis.len-r.x-r.width,width:r.height,height:r.width}),c||(s?(r.x+=u?0:r.width,r.width=0):(r.y+=u?r.height:0,r.height=0))),i.align=Kt(i.align,!s||c?"center":u?"right":"left"),i.verticalAlign=Kt(i.verticalAlign,s||c?"middle":u?"top":"bottom"),ge.prototype.alignDataLabel.call(this,t,e,i,r,o)}),function(t){var e=t.Chart,i=t.each,n=t.pick,r=t.addEvent;e.prototype.callbacks.push(function(t){function e(){var e=[];i(t.series,function(t){var r=t.options.dataLabels,o=t.dataLabelCollections||["dataLabel"];(r.enabled||t._hasPointLabels)&&!r.allowOverlap&&t.visible&&i(o,function(r){i(t.points,function(t){t[r]&&(t[r].labelrank=n(t.labelrank,t.shapeArgs&&t.shapeArgs.height),e.push(t[r]))})})}),t.hideOverlappingLabels(e)}e(),r(t,"redraw",e)}),e.prototype.hideOverlappingLabels=function(t){var e,n,r,o,s,a,l,u,c,h=t.length;for(n=0;n<h;n++)(e=t[n])&&(e.oldOpacity=e.opacity,e.newOpacity=1);for(t.sort(function(t,e){return(e.labelrank||0)-(t.labelrank||0)}),n=0;n<h;n++)for(r=t[n],e=n+1;e<h;++e)o=t[e],r&&o&&r.placed&&o.placed&&0!==r.newOpacity&&0!==o.newOpacity&&(s=r.alignAttr,a=o.alignAttr,l=r.parentGroup,u=o.parentGroup,c=2*(r.box?0:r.padding),s=!(a.x+u.translateX>s.x+l.translateX+(r.width-c)||a.x+u.translateX+(o.width-c)<s.x+l.translateX||a.y+u.translateY>s.y+l.translateY+(r.height-c)||a.y+u.translateY+(o.height-c)<s.y+l.translateY))&&((r.labelrank<o.labelrank?r:o).newOpacity=0);i(t,function(t){var e,i;t&&(i=t.newOpacity,t.oldOpacity!==i&&t.placed&&(i?t.show(!0):e=function(){t.hide()},t.alignAttr.opacity=i,t[t.isOld?"animate":"attr"](t.alignAttr,null,e)),t.isOld=!0)})}}(rt),te=rt.TrackerMixin={drawTrackerPoint:function(){var t=this,e=t.chart,i=e.pointer,n=t.options.cursor,r=n&&{cursor:n},o=function(t){for(var i,n=t.target;n&&!i;)i=n.point,n=n.parentNode;i!==O&&i!==e.hoverPoint&&i.onMouseOver(t)};Ft(t.points,function(t){t.graphic&&(t.graphic.element.point=t),t.dataLabel&&(t.dataLabel.element.point=t)}),t._hasTracking||(Ft(t.trackerGroups,function(e){t[e]&&(t[e].addClass("highcharts-tracker").on("mouseover",o).on("mouseout",function(t){i.onTrackerMouseOut(t)}).css(r),N)&&t[e].on("touchstart",o)}),t._hasTracking=!0)},drawTrackerGraph:function(){var t=this,e=t.options,i=e.trackByArea,n=[].concat(i?t.areaPath:t.graphPath),r=n.length,o=t.chart,s=o.pointer,a=o.renderer,l=o.options.tooltip.snap,u=t.tracker,c=e.cursor,h=c&&{cursor:c},d=function(){o.hoverSeries!==t&&t.onMouseOver()},p="rgba(192,192,192,"+(Mt?1e-4:.002)+")";if(r&&!i)for(c=r+1;c--;)"M"===n[c]&&n.splice(c+1,0,n[c+1]-l,n[c+2],"L"),(c&&"M"===n[c]||c===r)&&n.splice(c,0,"L",n[c-2]+l,n[c-1]);u?u.attr({d:n}):(t.tracker=a.path(n).attr({"stroke-linejoin":"round",visibility:t.visible?"visible":"hidden",stroke:p,fill:i?p:"none","stroke-width":e.lineWidth+(i?0:2*l),zIndex:2}).add(t.group),Ft([t.tracker,t.markerGroup],function(t){t.addClass("highcharts-tracker").on("mouseover",d).on("mouseout",function(t){s.onTrackerMouseOut(t)}).css(h),N&&t.on("touchstart",d)}))}},Nt.column&&(ve.prototype.drawTracker=te.drawTrackerPoint),Nt.pie&&(Nt.pie.prototype.drawTracker=te.drawTrackerPoint),Nt.scatter&&(ye.prototype.drawTracker=te.drawTrackerPoint),Xt(pe.prototype,{setItemEvents:function(t,e,i,n,r){var o=this;(i?e:t.legendGroup).on("mouseover",function(){t.setState("hover"),e.css(o.options.itemHoverStyle)}).on("mouseout",function(){e.css(t.visible?n:r),t.setState()}).on("click",function(e){var i=function(){t.setVisible&&t.setVisible()},e={browserEvent:e};t.firePointEvent?t.firePointEvent("legendItemClick",e,i):qt(t,"legendItemClick",e,i)})},createCheckboxForItem:function(t){t.checkbox=f("input",{type:"checkbox",checked:t.selected,defaultChecked:t.selected},this.options.itemCheckboxStyle,this.chart.container),Bt(t.checkbox,"click",function(e){qt(t.series||t,"checkboxClick",{checked:e.target.checked,item:t},function(){t.select()})})}}),H.legend.itemStyle.cursor="pointer",Xt(fe.prototype,{showResetZoom:function(){var t=this,e=H.lang,i=t.options.chart.resetZoomButton,n=i.theme,r=n.states,o="chart"===i.relativeTo?null:"plotBox";this.resetZoomButton=t.renderer.button(e.resetZoom,null,null,function(){t.zoomOut()},n,r&&r.hover).attr({align:i.position.align,title:e.resetZoomTitle}).add().align(i.position,!1,o)},zoomOut:function(){var t=this;qt(t,"selection",{resetSelection:!0},function(){t.zoom()})},zoom:function(t){var e,i,n=this.pointer,r=!1;!t||t.resetSelection?Ft(this.axes,function(t){e=t.zoom()}):Ft(t.xAxis.concat(t.yAxis),function(t){var i=t.axis,o=i.isXAxis;(n[o?"zoomX":"zoomY"]||n[o?"pinchX":"pinchY"])&&(e=i.zoom(t.min,t.max),i.displayBtn&&(r=!0))}),i=this.resetZoomButton,r&&!i?this.showResetZoom():!r&&s(i)&&(this.resetZoomButton=i.destroy()),e&&this.redraw(Kt(this.options.chart.animation,t&&t.animation,this.pointCount<100))},pan:function(t,e){var i,n=this,r=n.hoverPoints;r&&Ft(r,function(t){t.setState()}),Ft("xy"===e?[1,0]:[1],function(e){var e=n[e?"xAxis":"yAxis"][0],r=e.horiz,o=t[r?"chartX":"chartY"],r=r?"mouseDownX":"mouseDownY",s=n[r],a=(e.pointRange||0)/2,l=e.getExtremes(),u=e.toValue(s-o,!0)+a,a=e.toValue(s+e.len-o,!0)-a,s=s>o;e.series.length&&(s||u>ht(l.dataMin,l.min))&&(!s||a<ct(l.dataMax,l.max))&&(e.setExtremes(u,a,!1,!1,{trigger:"pan"}),i=!0),n[r]=o}),i&&n.redraw(!1),p(n.container,{cursor:"move"})}}),Xt(me.prototype,{select:function(t,e){var i=this,n=i.series,r=n.chart,t=Kt(t,!i.selected);i.firePointEvent(t?"select":"unselect",{accumulate:e},function(){i.selected=i.options.selected=t,n.options.data[Ht(i,n.data)]=i.options,i.setState(t&&"select"),e||Ft(r.getSelectedPoints(),function(t){t.selected&&t!==i&&(t.selected=t.options.selected=!1,n.options.data[Ht(t,n.data)]=t.options,t.setState(""),t.firePointEvent("unselect"))})})},onMouseOver:function(t,e){var i=this.series,n=i.chart,r=n.tooltip,o=n.hoverPoint;n.hoverSeries!==i&&i.onMouseOver(),o&&o!==this&&o.onMouseOut(),this.series&&(this.firePointEvent("mouseOver"),r&&(!r.shared||i.noSharedTooltip)&&r.refresh(this,t),this.setState("hover"),!e)&&(n.hoverPoint=this)},onMouseOut:function(){var t=this.series.chart,e=t.hoverPoints;this.firePointEvent("mouseOut"),e&&Ht(this,e)!==-1||(this.setState(),t.hoverPoint=null)},importEvents:function(){if(!this.hasImportedEvents){var t,e=n(this.series.options.point,this.options).events;this.events=e;for(t in e)Bt(this,t,e[t]);this.hasImportedEvents=!0}},setState:function(t,e){var i,r=lt(this.plotX),o=this.plotY,s=this.series,a=s.options.states,l=Zt[s.type].marker&&s.options.marker,u=l&&!l.enabled,c=l&&l.states[t],h=c&&c.enabled===!1,d=s.stateMarkerGraphic,p=this.marker||{},f=s.chart,m=s.halo,t=t||"";i=this.pointAttr[t]||s.pointAttr[t],t===this.state&&!e||this.selected&&"select"!==t||a[t]&&a[t].enabled===!1||t&&(h||u&&c.enabled===!1)||t&&p.states&&p.states[t]&&p.states[t].enabled===!1||(this.graphic?(l=l&&this.graphic.symbolName&&i.r,this.graphic.attr(n(i,l?{x:r-l,y:o-l,width:2*l,height:2*l}:{})),d&&d.hide()):(t&&c&&(l=c.radius,p=p.symbol||s.symbol,d&&d.currentSymbol!==p&&(d=d.destroy()),d?d[e?"animate":"attr"]({x:r-l,y:o-l}):p&&(s.stateMarkerGraphic=d=f.renderer.symbol(p,r-l,o-l,2*l,2*l).attr(i).add(s.markerGroup),d.currentSymbol=p)),d&&(d[t&&f.isInsidePlot(r,o,f.inverted)?"show":"hide"](),d.element.point=this)),(r=a[t]&&a[t].halo)&&r.size?(m||(s.halo=m=f.renderer.path().add(f.seriesGroup)),m.attr(Xt({fill:this.color||s.color,"fill-opacity":r.opacity,zIndex:-1},r.attributes))[e?"animate":"attr"]({d:this.haloPath(r.size)})):m&&m.attr({d:[]}),this.state=t)},haloPath:function(t){var e=this.series,i=e.chart,n=e.getPlotBox(),r=i.inverted,o=Math.floor(this.plotX);return i.renderer.symbols.circle(n.translateX+(r?e.yAxis.len-this.plotY:o)-t,n.translateY+(r?e.xAxis.len-o:this.plotY)-t,2*t,2*t)}}),Xt(ge.prototype,{onMouseOver:function(){var t=this.chart,e=t.hoverSeries;e&&e!==this&&e.onMouseOut(),this.options.events.mouseOver&&qt(this,"mouseOver"),this.setState("hover"),t.hoverSeries=this},onMouseOut:function(){var t=this.options,e=this.chart,i=e.tooltip,n=e.hoverPoint;e.hoverSeries=null,n&&n.onMouseOut(),this&&t.events.mouseOut&&qt(this,"mouseOut"),i&&!t.stickyTracking&&(!i.shared||this.noSharedTooltip)&&i.hide(),this.setState()},setState:function(t){var e=this.options,i=this.graph,n=e.states,r=e.lineWidth,e=0,t=t||"";if(this.state!==t&&(this.state=t,!(n[t]&&n[t].enabled===!1)&&(t&&(r=n[t].lineWidth||r+(n[t].lineWidthPlus||0)),i&&!i.dashstyle)))for(t={"stroke-width":r},i.attr(t);this["zoneGraph"+e];)this["zoneGraph"+e].attr(t),e+=1},setVisible:function(t,e){var i,n=this,r=n.chart,o=n.legendItem,s=r.options.chart.ignoreHiddenSeries,a=n.visible;i=(n.visible=t=n.userOptions.visible=t===O?!a:t)?"show":"hide",
Ft(["group","dataLabelsGroup","markerGroup","tracker"],function(t){n[t]&&n[t][i]()}),r.hoverSeries!==n&&(r.hoverPoint&&r.hoverPoint.series)!==n||n.onMouseOut(),o&&r.legend.colorizeItem(n,t),n.isDirty=!0,n.options.stacking&&Ft(r.series,function(t){t.options.stacking&&t.visible&&(t.isDirty=!0)}),Ft(n.linkedSeries,function(e){e.setVisible(t,!1)}),s&&(r.isDirtyBox=!0),e!==!1&&r.redraw(),qt(n,i)},show:function(){this.setVisible(!0)},hide:function(){this.setVisible(!1)},select:function(t){this.selected=t=t===O?!this.selected:t,this.checkbox&&(this.checkbox.checked=t),qt(this,t?"select":"unselect")},drawTracker:te.drawTrackerGraph}),Xt(rt,{Color:A,Point:me,Tick:I,Renderer:j,SVGElement:E,SVGRenderer:ee,arrayMin:x,arrayMax:k,charts:Et,correctFloat:T,dateFormat:F,error:e,format:y,pathAnim:void 0,getOptions:function(){return H},hasBidiBug:Tt,isTouchDevice:kt,setOptions:function(t){return H=n(!0,H,t),L(),H},addEvent:Bt,removeEvent:$t,createElement:f,discardElement:M,css:p,each:Ft,map:zt,merge:n,splat:h,stableSort:w,extendClass:m,pInt:r,svg:Mt,canvas:St,vml:!Mt&&!St,product:"Highcharts",version:"4.2.5"}),rt}),function(t){"use strict";function e(t){return"[object Array]"===Object.prototype.toString.call(t)}function i(t){return t instanceof Function}function n(t){return!i(t)&&t instanceof Object}function r(t,i){var o;for(o in i)n(i[o])||e(i[o])?(n(i[o])&&!n(t[o])&&(t[o]={}),e(i[o])&&!e(t[o])&&(t[o]=[]),r(t[o],i[o])):void 0!==i[o]&&(t[o]=i[o])}function o(t,e){var i={};return r(i,t),r(i,e),i}function s(t){var e,i,n,r,o,s,a,l,u,c,h;return c=Object.prototype.toString.call(t),"[object Date]"===c?t:"[object String]"===c?(n=t.match(q),n?(h=parseInt(n[1],10),s=parseInt(n[3],10)-1,e=parseInt(n[5],10),i=parseInt(n[7],10),o=n[9]?parseInt(n[9],10):0,u=n[11]?parseInt(n[11],10):0,r=n[12]?1e3*parseFloat(U+n[12].slice(1)):0,l=Date.UTC(h,s,e,i,o,u,r),n[13]&&n[14]&&(a=60*n[15],n[17]&&(a+=parseInt(n[17],10)),a*="-"===n[14]?-1:1,l-=60*a*1e3),new Date(l)):void 0):void 0}function a(t){var e,i,n;for(e=0;e<t.length;e++)for(n=t[e].data,i=0;i<n.length;i++)if(n[i][1]<0)return!0;return!1}function l(t,e,i,n,r,s,l){return function(u,c,h){var d=o({},t);return d=o(d,h||{}),c.hideLegend&&e(d),"min"in c?i(d,c.min):a(u)||i(d,0),c.max&&n(d,c.max),"stacked"in c&&r(d,c.stacked),c.colors&&(d.colors=c.colors),c.xtitle&&s(d,c.xtitle),c.ytitle&&l(d,c.ytitle),d=o(d,c.library||{})}}function u(t,e){document.body.innerText?t.innerText=e:t.textContent=e}function c(t,e){u(t,"Error Loading Chart: "+e),t.style.color="#ff0000"}function h(t,e,i){d(e,i,function(e,i,n){var r="string"==typeof n?n:n.message;c(t,r)})}function d(e,i,n){var r=t.jQuery||t.Zepto||t.$;if(r)r.ajax({dataType:"json",url:e,success:i,error:n});else{var o=new XMLHttpRequest;o.open("GET",e,!0),o.setRequestHeader("Content-Type","application/json"),o.onload=function(){200===o.status?i(JSON.parse(o.responseText),o.statusText,o):n(o,"error",o.statusText)},o.send()}}function p(t,e){try{e(t)}catch(e){throw c(t.element,e.message),e}}function f(t,e){"string"==typeof t.dataSource?h(t.element,t.dataSource,function(i){t.data=i,p(t,e)}):(t.data=t.dataSource,p(t,e))}function m(t){return""+t}function g(t){return parseFloat(t)}function v(t){var e,i,n,r;if("object"!=typeof t)if("number"==typeof t)t=new Date(1e3*t);else{if(e=t.match(Q))return i=parseInt(e[1],10),n=parseInt(e[3],10)-1,r=parseInt(e[5],10),new Date(i,n,r);var o=t.replace(/ /,"T").replace(" ","").replace("UTC","Z");t=s(o)||new Date(t)}return t}function y(t){if(!e(t)){var i,n=[];for(i in t)t.hasOwnProperty(i)&&n.push([i,t[i]]);t=n}return t}function b(t,e){return t[0].getTime()-e[0].getTime()}function _(t,e){return t-e}function w(){!G&&"Highcharts"in t&&(G=new function(){var e=t.Highcharts;this.name="highcharts";var i={chart:{},xAxis:{title:{text:null},labels:{style:{fontSize:"12px"}}},yAxis:{title:{text:null},labels:{style:{fontSize:"12px"}}},title:{text:null},credits:{enabled:!1},legend:{borderWidth:0},tooltip:{style:{fontSize:"12px"}},plotOptions:{areaspline:{},series:{marker:{}}}},n=function(t){t.legend.enabled=!1},r=function(t,e){t.yAxis.min=e},s=function(t,e){t.yAxis.max=e},a=function(t,e){t.plotOptions.series.stacking=e?"normal":null},u=function(t,e){t.xAxis.title.text=e},c=function(t,e){t.yAxis.title.text=e},h=l(i,n,r,s,a,u,c);this.renderLineChart=function(t,i){i=i||"spline";var n={};"areaspline"===i&&(n={plotOptions:{areaspline:{stacking:"normal"},series:{marker:{enabled:!1}}}});var r,o,s,a=h(t.data,t.options,n);a.xAxis.type=t.options.discrete?"category":"datetime",a.chart.type||(a.chart.type=i),a.chart.renderTo=t.element.id;var l=t.data;for(o=0;o<l.length;o++){if(r=l[o].data,!t.options.discrete)for(s=0;s<r.length;s++)r[s][0]=r[s][0].getTime();l[o].marker={symbol:"circle"}}a.series=l,new e.Chart(a)},this.renderScatterChart=function(t){var i={},n=h(t.data,t.options,i);n.chart.type="scatter",n.chart.renderTo=t.element.id,n.series=t.data,new e.Chart(n)},this.renderPieChart=function(t){var n={};t.options.colors&&(n.colors=t.options.colors);var r=o(o(i,n),t.options.library||{});r.chart.renderTo=t.element.id,r.series=[{type:"pie",name:t.options.label||"Value",data:t.data}],new e.Chart(r)},this.renderColumnChart=function(t,i){i=i||"column";var n,r,o,s,a=t.data,l=h(a,t.options),u=[];for(l.chart.type=i,l.chart.renderTo=t.element.id,n=0;n<a.length;n++)for(o=a[n],r=0;r<o.data.length;r++)s=o.data[r],u[s[0]]||(u[s[0]]=new Array(a.length)),u[s[0]][n]=s[1];var c=[];for(n in u)u.hasOwnProperty(n)&&c.push(n);l.xAxis.categories=c;var d=[];for(n=0;n<a.length;n++){for(s=[],r=0;r<c.length;r++)s.push(u[c[r]][n]||0);d.push({name:a[n].name,data:s})}l.series=d,new e.Chart(l)};var d=this;this.renderBarChart=function(t){d.renderColumnChart(t,"bar")},this.renderAreaChart=function(t){d.renderLineChart(t,"areaspline")}},K.push(G)),!V&&t.google&&(t.google.setOnLoadCallback||t.google.charts)&&(V=new function(){var e=t.google;this.name="google";var i={},n=[],r=function(){for(var t,i,r=0;r<n.length;r++)t=n[r],i=e.visualization&&("corechart"===t.pack&&e.visualization.LineChart||"timeline"===t.pack&&e.visualization.Timeline),i&&(t.callback(),n.splice(r,1),r--)},s=function(o,s){if(s||(s=o,o="corechart"),n.push({pack:o,callback:s}),i[o])r();else{i[o]=!0;var a={packages:[o],callback:r};J.language&&(a.language=J.language),t.google.setOnLoadCallback?e.load("visualization","1",a):e.charts.load("current",a)}},a={chartArea:{},fontName:"'Lucida Grande', 'Lucida Sans Unicode', Verdana, Arial, Helvetica, sans-serif",pointSize:6,legend:{textStyle:{fontSize:12,color:"#444"},alignment:"center",position:"right"},curveType:"function",hAxis:{textStyle:{color:"#666",fontSize:12},titleTextStyle:{},gridlines:{color:"transparent"},baselineColor:"#ccc",viewWindow:{}},vAxis:{textStyle:{color:"#666",fontSize:12},titleTextStyle:{},baselineColor:"#ccc",viewWindow:{}},tooltip:{textStyle:{color:"#666",fontSize:12}}},u=function(t){t.legend.position="none"},c=function(t,e){t.vAxis.viewWindow.min=e},h=function(t,e){t.vAxis.viewWindow.max=e},d=function(t,e){t.hAxis.viewWindow.min=e},p=function(t,e){t.hAxis.viewWindow.max=e},f=function(t,e){t.isStacked=!!e},m=function(t,e){t.hAxis.title=e,t.hAxis.titleTextStyle.italic=!1},v=function(t,e){t.vAxis.title=e,t.vAxis.titleTextStyle.italic=!1},y=l(a,u,c,h,f,m,v),_=function(t,i){var n,r,o,s,a,l=[];for(n=0;n<t.length;n++)for(o=t[n],r=0;r<o.data.length;r++)s=o.data[r],a="datetime"===i?s[0].getTime():s[0],l[a]||(l[a]=new Array(t.length)),l[a][n]=g(s[1]);var u,c=[],h=!0;for(n in l)l.hasOwnProperty(n)&&("datetime"===i?(u=new Date(g(n)),h=h&&M(u)):u="number"===i?g(n):n,c.push([u].concat(l[n])));"datetime"===i&&c.sort(b);var d=new e.visualization.DataTable;for(i="datetime"===i&&h?"date":i,d.addColumn(i,""),n=0;n<t.length;n++)d.addColumn("number",t[n].name);return d.addRows(c),d},w=function(e){t.attachEvent?t.attachEvent("onresize",e):t.addEventListener&&t.addEventListener("resize",e,!0),e()};this.renderLineChart=function(t){s(function(){var i=y(t.data,t.options),n=_(t.data,t.options.discrete?"string":"datetime");t.chart=new e.visualization.LineChart(t.element),w(function(){t.chart.draw(n,i)})})},this.renderPieChart=function(t){s(function(){var i={chartArea:{top:"10%",height:"80%"}};t.options.colors&&(i.colors=t.options.colors);var n=o(o(a,i),t.options.library||{}),r=new e.visualization.DataTable;r.addColumn("string",""),r.addColumn("number","Value"),r.addRows(t.data),t.chart=new e.visualization.PieChart(t.element),w(function(){t.chart.draw(r,n)})})},this.renderColumnChart=function(t){s(function(){var i=y(t.data,t.options),n=_(t.data,"string");t.chart=new e.visualization.ColumnChart(t.element),w(function(){t.chart.draw(n,i)})})},this.renderBarChart=function(t){s(function(){var i={hAxis:{gridlines:{color:"#ccc"}}},n=l(a,u,d,p,f,m,v)(t.data,t.options,i),r=_(t.data,"string");t.chart=new e.visualization.BarChart(t.element),w(function(){t.chart.draw(r,n)})})},this.renderAreaChart=function(t){s(function(){var i={isStacked:!0,pointSize:0,areaOpacity:.5},n=y(t.data,t.options,i),r=_(t.data,t.options.discrete?"string":"datetime");t.chart=new e.visualization.AreaChart(t.element),w(function(){t.chart.draw(r,n)})})},this.renderGeoChart=function(t){s(function(){var i={legend:"none",colorAxis:{colors:t.options.colors||["#f6c7b6","#ce502d"]}},n=o(o(a,i),t.options.library||{}),r=new e.visualization.DataTable;r.addColumn("string",""),r.addColumn("number",t.options.label||"Value"),r.addRows(t.data),t.chart=new e.visualization.GeoChart(t.element),w(function(){t.chart.draw(r,n)})})},this.renderScatterChart=function(t){s(function(){var i={},n=y(t.data,t.options,i),r=_(t.data,"number");t.chart=new e.visualization.ScatterChart(t.element),w(function(){t.chart.draw(r,n)})})},this.renderTimeline=function(t){s("timeline",function(){var i={legend:"none"};t.options.colors&&(i.colors=t.options.colors);var n=o(o(a,i),t.options.library||{}),r=new e.visualization.DataTable;r.addColumn({type:"string",id:"Name"}),r.addColumn({type:"date",id:"Start"}),r.addColumn({type:"date",id:"End"}),r.addRows(t.data),t.element.style.lineHeight="normal",t.chart=new e.visualization.Timeline(t.element),w(function(){t.chart.draw(r,n)})})}},K.push(V)),!X&&"Chart"in t&&(X=new function(){var e=t.Chart;this.name="chartjs";var i={maintainAspectRatio:!1,animation:!1},n={scales:{yAxes:[{ticks:{maxTicksLimit:4},scaleLabel:{fontSize:16,fontColor:"#333"}}],xAxes:[{gridLines:{drawOnChartArea:!1},scaleLabel:{fontSize:16,fontColor:"#333"},time:{},ticks:{}}]},legend:{}},r=["#3366CC","#DC3912","#FF9900","#109618","#990099","#3B3EAC","#0099C6","#DD4477","#66AA00","#B82E2E","#316395","#994499","#22AA99","#AAAA11","#6633CC","#E67300","#8B0707","#329262","#5574A6","#3B3EAC"],s=function(t){t.legend.display=!1},a=function(t,e){null!==e&&(t.scales.yAxes[0].ticks.min=e)},u=function(t,e){t.scales.yAxes[0].ticks.max=e},c=function(t,e){null!==e&&(t.scales.xAxes[0].ticks.min=e)},h=function(t,e){t.scales.xAxes[0].ticks.max=e},d=function(t,e){t.scales.xAxes[0].stacked=!!e,t.scales.yAxes[0].stacked=!!e},p=function(t,e){t.scales.xAxes[0].scaleLabel.display=!0,t.scales.xAxes[0].scaleLabel.labelString=e},f=function(t,e){t.scales.yAxes[0].scaleLabel.display=!0,t.scales.yAxes[0].scaleLabel.labelString=e},v=function(t,i,n,r){t.element.innerHTML="<canvas></canvas>";var o=t.element.getElementsByTagName("CANVAS")[0];t.chart=new e(o,{type:i,data:n,options:r})},y=function(t,e){var i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return i?"rgba("+parseInt(i[1],16)+", "+parseInt(i[2],16)+", "+parseInt(i[3],16)+", "+e+")":t},b=function(t,e,i){var n=Math.ceil(t.element.offsetWidth/4/e.labels.length);n>25&&(n=25),i.scales.xAxes[0].ticks.callback=function(t){return t=m(t),t.length>n?t.substring(0,n-2)+"...":t}},w=l(o(i,n),s,a,u,d,p,f),x=function(t,e,i){var n,s,a,l,u,c,h=[],d=[],p=t.options.colors||r,f=!0,m=!0,v=!0,b=!0,w=!0,x=!0,L=("line"===i||"area"===i)&&!t.options.discrete,A=t.data,E=[],I=[];for(s=0;s<A.length;s++)for(l=A[s],a=0;a<l.data.length;a++)u=l.data[a],c=L?u[0].getTime():u[0],I[c]||(I[c]=new Array(A.length)),I[c][s]=g(u[1]),E.indexOf(c)===-1&&E.push(c);L&&E.sort(_);var P=[];for(a=0;a<A.length;a++)P.push([]);var O,j;for(j=0;j<E.length;j++)for(s=E[j],L?(O=new Date(g(s)),f=f&&M(O),n||(n=O.getDay()),m=m&&T(O,n),v=v&&S(O),b=b&&D(O),w=w&&C(O),x=x&&k(O)):O=s,d.push(O),a=0;a<A.length;a++)P[a].push(I[s][a]);for(s=0;s<A.length;s++){l=A[s];var N="line"!==i?y(p[s],.5):p[s],Y={label:l.name,data:P[s],fill:"area"===i,borderColor:p[s],backgroundColor:N,pointBackgroundColor:p[s],borderWidth:2};h.push(o(Y,l.library||{}))}if(L&&d.length>0){var H=d[0].getTime(),F=d[0].getTime();for(s=1;s<d.length;s++)O=d[s].getTime(),O<H&&(H=O),O>F&&(F=O);var R=(F-H)/864e5;if(!e.scales.xAxes[0].time.unit){var W;if(b||R>3650?(e.scales.xAxes[0].time.unit="year",W=365):v||R>300?(e.scales.xAxes[0].time.unit="month",W=30):f||R>10?(e.scales.xAxes[0].time.unit="day",W=1):w?(e.scales.xAxes[0].time.unit="hour",W=1/24):x&&(e.scales.xAxes[0].time.displayFormats={minute:"h:mm a"},e.scales.xAxes[0].time.unit="minute",W=1/24/60),W&&R>0){var z=Math.ceil(R/W/(t.element.offsetWidth/100));m&&1===W&&(z=7*Math.ceil(z/7)),e.scales.xAxes[0].time.unitStepSize=z}}e.scales.xAxes[0].time.tooltipFormat||(f?e.scales.xAxes[0].time.tooltipFormat="ll":w?e.scales.xAxes[0].time.tooltipFormat="MMM D, h a":x&&(e.scales.xAxes[0].time.tooltipFormat="h:mm a"))}var B={labels:d,datasets:h};return B};this.renderLineChart=function(t,e){var i={};!t.options.max&&A(t.data)&&(t.options.max=1);var n=w(t.data,o(i,t.options)),r=x(t,n,e||"line");n.scales.xAxes[0].type=t.options.discrete?"category":"time",v(t,"line",r,n)},this.renderPieChart=function(t){for(var e=o(i,t.options.library||{}),n=[],s=[],a=0;a<t.data.length;a++){var l=t.data[a];n.push(l[0]),s.push(l[1])}var u={labels:n,datasets:[{data:s,backgroundColor:t.options.colors||r}]};v(t,"pie",u,e)},this.renderColumnChart=function(t,e){var r;r="bar"===e?l(o(i,n),s,c,h,d,p,f)(t.data,t.options):w(t.data,t.options);var a=x(t,r,"column");b(t,a,r),v(t,"bar"===e?"horizontalBar":"bar",a,r)};var L=this;this.renderAreaChart=function(t){L.renderLineChart(t,"area")},this.renderBarChart=function(t){L.renderColumnChart(t,"bar")},this.renderScatterChart=function(t){for(var e=w(t.data,t.options),i=t.options.colors||r,n=[],o=t.data,s=0;s<o.length;s++){for(var a=o[s],l=[],u=0;u<a.data.length;u++)l.push({x:g(a.data[u][0]),y:g(a.data[u][1])});n.push({label:a.name,showLine:!1,data:l,borderColor:i[s],backgroundColor:i[s],pointBackgroundColor:i[s]})}var c={datasets:n};e.scales.xAxes[0].type="linear",e.scales.xAxes[0].position="bottom",v(t,"line",c,e)}},K.unshift(X))}function x(t,e){var n,r,o,s;for(o="render"+t,s=e.options.adapter,w(),n=0;n<K.length;n++)if(r=K[n],(!s||s===r.name)&&i(r[o]))return r[o](e);throw new Error("No adapter found")}function k(t){return 0===t.getMilliseconds()&&0===t.getSeconds()}function C(t){return k(t)&&0===t.getMinutes()}function M(t){return C(t)&&0===t.getHours()}function T(t,e){return M(t)&&t.getDay()===e}function S(t){return M(t)&&1===t.getDate()}function D(t){return S(t)&&0===t.getMonth()}function L(t){return!isNaN(v(t))&&m(t).length>=6}function A(t){var e,i,n;for(e=0;e<t.length;e++)for(n=t[e].data,i=0;i<n.length;i++)if(0!=n[i][1])return!1;return!0}function E(t){var e,i,n;for(e=0;e<t.length;e++)for(n=y(t[e].data),i=0;i<n.length;i++)if(!L(n[i][0]))return!0;return!1}function I(t,i,n){var r;for(!e(t)||"object"!=typeof t[0]||e(t[0])?(t=[{name:i.label||"Value",data:t}],i.hideLegend=!0):i.hideLegend=!1,null!==i.discrete&&void 0!==i.discrete||(i.discrete=E(t)),i.discrete&&(n="string"),r=0;r<t.length;r++)t[r].data=tt(y(t[r].data),n);return t}function P(t){var e,i=y(t);for(e=0;e<i.length;e++)i[e]=[m(i[e][0]),g(i[e][1])];return i}function O(t){var e;for(e=0;e<t.length;e++)t[e][1]=v(t[e][1]),t[e][2]=v(t[e][2]);return t}function j(t){t.data=I(t.data,t.options,"datetime"),x("LineChart",t)}function N(t){t.data=I(t.data,t.options,"string"),x("ColumnChart",t)}function Y(t){t.data=P(t.data),x("PieChart",t)}function H(t){t.data=I(t.data,t.options,"string"),x("BarChart",t)}function F(t){t.data=I(t.data,t.options,"datetime"),x("AreaChart",t)}function R(t){t.data=P(t.data),x("GeoChart",t)}function W(t){t.data=I(t.data,t.options,"number"),x("ScatterChart",t)}function z(t){t.data=O(t.data),x("Timeline",t)}function B(t,e,i,n,r){var o;if("string"==typeof e&&(o=e,e=document.getElementById(e),!e))throw new Error("No element with id "+o);t.element=e,t.options=n||{},t.dataSource=i,t.getElement=function(){return e},t.getData=function(){return t.data},t.getOptions=function(){return n||{}},t.getChartObject=function(){return t.chart},$.charts[e.id]=t,f(t,r)}var $,q,U,V,G,X,J=t.Chartkick||{},K=[],Q=/^(\d\d\d\d)(\-)?(\d\d)(\-)?(\d\d)$/i;q=/(\d\d\d\d)(\-)?(\d\d)(\-)?(\d\d)(T)?(\d\d)(:)?(\d\d)?(:)?(\d\d)?([\.,]\d+)?($|Z|([\+\-])(\d\d)(:)?(\d\d)?)/i,U=String(1.5).charAt(1);var Z=function(t,e){return t="number"===e?g(t):"datetime"===e?v(t):m(t)},tt=function(t,e){var i,n,r=[];for(n=0;n<t.length;n++)i=Z(t[n][0],e),r.push([i,g(t[n][1])]);return"datetime"===e&&r.sort(b),r};$={LineChart:function(t,e,i){B(this,t,e,i,j)},PieChart:function(t,e,i){B(this,t,e,i,Y)},ColumnChart:function(t,e,i){B(this,t,e,i,N)},BarChart:function(t,e,i){B(this,t,e,i,H)},AreaChart:function(t,e,i){B(this,t,e,i,F)},GeoChart:function(t,e,i){B(this,t,e,i,R)},ScatterChart:function(t,e,i){B(this,t,e,i,W)},Timeline:function(t,e,i){B(this,t,e,i,z)},charts:{},configure:function(t){for(var e in t)t.hasOwnProperty(e)&&(J[e]=t[e])}},"object"==typeof module&&"object"==typeof module.exports?module.exports=$:t.Chartkick=$}(window),function(t,e){"object"==typeof module&&"object"==typeof module.exports?module.exports=t.document?e(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return e(t)}:e(t)}("undefined"!=typeof window?window:this,function(t,e){function i(t){var e=!!t&&"length"in t&&t.length,i=pt.type(t);return"function"!==i&&!pt.isWindow(t)&&("array"===i||0===e||"number"==typeof e&&e>0&&e-1 in t)}function n(t,e,i){if(pt.isFunction(e))return pt.grep(t,function(t,n){return!!e.call(t,n,t)!==i});if(e.nodeType)return pt.grep(t,function(t){return t===e!==i});if("string"==typeof e){if(kt.test(e))return pt.filter(e,t,i);e=pt.filter(e,t)}return pt.grep(t,function(t){return pt.inArray(t,e)>-1!==i})}function r(t,e){do t=t[e];while(t&&1!==t.nodeType);return t}function o(t){var e={};return pt.each(t.match(Lt)||[],function(t,i){e[i]=!0}),e}function s(){nt.addEventListener?(nt.removeEventListener("DOMContentLoaded",a),t.removeEventListener("load",a)):(nt.detachEvent("onreadystatechange",a),t.detachEvent("onload",a))}function a(){(nt.addEventListener||"load"===t.event.type||"complete"===nt.readyState)&&(s(),pt.ready())}function l(t,e,i){if(void 0===i&&1===t.nodeType){var n="data-"+e.replace(Ot,"-$1").toLowerCase();if(i=t.getAttribute(n),"string"==typeof i){try{i="true"===i||"false"!==i&&("null"===i?null:+i+""===i?+i:Pt.test(i)?pt.parseJSON(i):i)}catch(t){}pt.data(t,e,i)}else i=void 0}return i}function u(t){var e;for(e in t)if(("data"!==e||!pt.isEmptyObject(t[e]))&&"toJSON"!==e)return!1;return!0}function c(t,e,i,n){if(It(t)){var r,o,s=pt.expando,a=t.nodeType,l=a?pt.cache:t,u=a?t[s]:t[s]&&s;if(u&&l[u]&&(n||l[u].data)||void 0!==i||"string"!=typeof e)return u||(u=a?t[s]=it.pop()||pt.guid++:s),l[u]||(l[u]=a?{}:{toJSON:pt.noop}),"object"!=typeof e&&"function"!=typeof e||(n?l[u]=pt.extend(l[u],e):l[u].data=pt.extend(l[u].data,e)),o=l[u],n||(o.data||(o.data={}),o=o.data),void 0!==i&&(o[pt.camelCase(e)]=i),"string"==typeof e?(r=o[e],null==r&&(r=o[pt.camelCase(e)])):r=o,r}}function h(t,e,i){if(It(t)){var n,r,o=t.nodeType,s=o?pt.cache:t,a=o?t[pt.expando]:pt.expando;if(s[a]){if(e&&(n=i?s[a]:s[a].data)){pt.isArray(e)?e=e.concat(pt.map(e,pt.camelCase)):e in n?e=[e]:(e=pt.camelCase(e),e=e in n?[e]:e.split(" ")),r=e.length;for(;r--;)delete n[e[r]];if(i?!u(n):!pt.isEmptyObject(n))return}(i||(delete s[a].data,u(s[a])))&&(o?pt.cleanData([t],!0):ht.deleteExpando||s!=s.window?delete s[a]:s[a]=void 0)}}}function d(t,e,i,n){var r,o=1,s=20,a=n?function(){return n.cur()}:function(){return pt.css(t,e,"")},l=a(),u=i&&i[3]||(pt.cssNumber[e]?"":"px"),c=(pt.cssNumber[e]||"px"!==u&&+l)&&Nt.exec(pt.css(t,e));if(c&&c[3]!==u){u=u||c[3],i=i||[],c=+l||1;do o=o||".5",c/=o,pt.style(t,e,c+u);while(o!==(o=a()/l)&&1!==o&&--s)}return i&&(c=+c||+l||0,r=i[1]?c+(i[1]+1)*i[2]:+i[2],n&&(n.unit=u,n.start=c,n.end=r)),r}function p(t){var e=$t.split("|"),i=t.createDocumentFragment();if(i.createElement)for(;e.length;)i.createElement(e.pop());return i}function f(t,e){var i,n,r=0,o="undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e||"*"):"undefined"!=typeof t.querySelectorAll?t.querySelectorAll(e||"*"):void 0;if(!o)for(o=[],i=t.childNodes||t;null!=(n=i[r]);r++)!e||pt.nodeName(n,e)?o.push(n):pt.merge(o,f(n,e));return void 0===e||e&&pt.nodeName(t,e)?pt.merge([t],o):o}function m(t,e){for(var i,n=0;null!=(i=t[n]);n++)pt._data(i,"globalEval",!e||pt._data(e[n],"globalEval"))}function g(t){Rt.test(t.type)&&(t.defaultChecked=t.checked)}function v(t,e,i,n,r){for(var o,s,a,l,u,c,h,d=t.length,v=p(e),y=[],b=0;b<d;b++)if(s=t[b],s||0===s)if("object"===pt.type(s))pt.merge(y,s.nodeType?[s]:s);else if(Ut.test(s)){for(l=l||v.appendChild(e.createElement("div")),u=(Wt.exec(s)||["",""])[1].toLowerCase(),h=qt[u]||qt._default,l.innerHTML=h[1]+pt.htmlPrefilter(s)+h[2],o=h[0];o--;)l=l.lastChild;if(!ht.leadingWhitespace&&Bt.test(s)&&y.push(e.createTextNode(Bt.exec(s)[0])),!ht.tbody)for(s="table"!==u||Vt.test(s)?"<table>"!==h[1]||Vt.test(s)?0:l:l.firstChild,o=s&&s.childNodes.length;o--;)pt.nodeName(c=s.childNodes[o],"tbody")&&!c.childNodes.length&&s.removeChild(c);for(pt.merge(y,l.childNodes),l.textContent="";l.firstChild;)l.removeChild(l.firstChild);l=v.lastChild}else y.push(e.createTextNode(s));for(l&&v.removeChild(l),ht.appendChecked||pt.grep(f(y,"input"),g),b=0;s=y[b++];)if(n&&pt.inArray(s,n)>-1)r&&r.push(s);else if(a=pt.contains(s.ownerDocument,s),l=f(v.appendChild(s),"script"),a&&m(l),i)for(o=0;s=l[o++];)zt.test(s.type||"")&&i.push(s);return l=null,v}function y(){return!0}function b(){return!1}function _(){try{return nt.activeElement}catch(t){}}function w(t,e,i,n,r,o){var s,a;if("object"==typeof e){"string"!=typeof i&&(n=n||i,i=void 0);for(a in e)w(t,a,i,n,e[a],o);return t}if(null==n&&null==r?(r=i,n=i=void 0):null==r&&("string"==typeof i?(r=n,n=void 0):(r=n,n=i,i=void 0)),r===!1)r=b;else if(!r)return t;return 1===o&&(s=r,r=function(t){return pt().off(t),s.apply(this,arguments)},r.guid=s.guid||(s.guid=pt.guid++)),t.each(function(){pt.event.add(this,e,r,n,i)})}function x(t,e){return pt.nodeName(t,"table")&&pt.nodeName(11!==e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function k(t){return t.type=(null!==pt.find.attr(t,"type"))+"/"+t.type,t}function C(t){var e=re.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function M(t,e){if(1===e.nodeType&&pt.hasData(t)){var i,n,r,o=pt._data(t),s=pt._data(e,o),a=o.events;if(a){delete s.handle,s.events={};for(i in a)for(n=0,r=a[i].length;n<r;n++)pt.event.add(e,i,a[i][n])}s.data&&(s.data=pt.extend({},s.data))}}function T(t,e){var i,n,r;if(1===e.nodeType){if(i=e.nodeName.toLowerCase(),!ht.noCloneEvent&&e[pt.expando]){r=pt._data(e);for(n in r.events)pt.removeEvent(e,n,r.handle);e.removeAttribute(pt.expando)}"script"===i&&e.text!==t.text?(k(e).text=t.text,C(e)):"object"===i?(e.parentNode&&(e.outerHTML=t.outerHTML),ht.html5Clone&&t.innerHTML&&!pt.trim(e.innerHTML)&&(e.innerHTML=t.innerHTML)):"input"===i&&Rt.test(t.type)?(e.defaultChecked=e.checked=t.checked,e.value!==t.value&&(e.value=t.value)):"option"===i?e.defaultSelected=e.selected=t.defaultSelected:"input"!==i&&"textarea"!==i||(e.defaultValue=t.defaultValue)}}function S(t,e,i,n){e=ot.apply([],e);var r,o,s,a,l,u,c=0,h=t.length,d=h-1,p=e[0],m=pt.isFunction(p);if(m||h>1&&"string"==typeof p&&!ht.checkClone&&ne.test(p))return t.each(function(r){var o=t.eq(r);m&&(e[0]=p.call(this,r,o.html())),S(o,e,i,n)});if(h&&(u=v(e,t[0].ownerDocument,!1,t,n),r=u.firstChild,1===u.childNodes.length&&(u=r),r||n)){for(a=pt.map(f(u,"script"),k),s=a.length;c<h;c++)o=u,c!==d&&(o=pt.clone(o,!0,!0),s&&pt.merge(a,f(o,"script"))),i.call(t[c],o,c);if(s)for(l=a[a.length-1].ownerDocument,pt.map(a,C),c=0;c<s;c++)o=a[c],zt.test(o.type||"")&&!pt._data(o,"globalEval")&&pt.contains(l,o)&&(o.src?pt._evalUrl&&pt._evalUrl(o.src):pt.globalEval((o.text||o.textContent||o.innerHTML||"").replace(oe,"")));u=r=null}return t}function D(t,e,i){for(var n,r=e?pt.filter(e,t):t,o=0;null!=(n=r[o]);o++)i||1!==n.nodeType||pt.cleanData(f(n)),n.parentNode&&(i&&pt.contains(n.ownerDocument,n)&&m(f(n,"script")),n.parentNode.removeChild(n));return t}function L(t,e){var i=pt(e.createElement(t)).appendTo(e.body),n=pt.css(i[0],"display");return i.detach(),n}function A(t){var e=nt,i=ue[t];return i||(i=L(t,e),"none"!==i&&i||(le=(le||pt("<iframe frameborder='0' width='0' height='0'/>")).appendTo(e.documentElement),e=(le[0].contentWindow||le[0].contentDocument).document,e.write(),e.close(),i=L(t,e),le.detach()),ue[t]=i),i}function E(t,e){return{get:function(){return t()?void delete this.get:(this.get=e).apply(this,arguments)}}}function I(t){if(t in Ce)return t;for(var e=t.charAt(0).toUpperCase()+t.slice(1),i=ke.length;i--;)if(t=ke[i]+e,t in Ce)return t}function P(t,e){for(var i,n,r,o=[],s=0,a=t.length;s<a;s++)n=t[s],n.style&&(o[s]=pt._data(n,"olddisplay"),i=n.style.display,e?(o[s]||"none"!==i||(n.style.display=""),""===n.style.display&&Ht(n)&&(o[s]=pt._data(n,"olddisplay",A(n.nodeName)))):(r=Ht(n),(i&&"none"!==i||!r)&&pt._data(n,"olddisplay",r?i:pt.css(n,"display"))));for(s=0;s<a;s++)n=t[s],n.style&&(e&&"none"!==n.style.display&&""!==n.style.display||(n.style.display=e?o[s]||"":"none"));return t}function O(t,e,i){var n=_e.exec(e);return n?Math.max(0,n[1]-(i||0))+(n[2]||"px"):e}function j(t,e,i,n,r){for(var o=i===(n?"border":"content")?4:"width"===e?1:0,s=0;o<4;o+=2)"margin"===i&&(s+=pt.css(t,i+Yt[o],!0,r)),n?("content"===i&&(s-=pt.css(t,"padding"+Yt[o],!0,r)),"margin"!==i&&(s-=pt.css(t,"border"+Yt[o]+"Width",!0,r))):(s+=pt.css(t,"padding"+Yt[o],!0,r),"padding"!==i&&(s+=pt.css(t,"border"+Yt[o]+"Width",!0,r)));return s}function N(t,e,i){var n=!0,r="width"===e?t.offsetWidth:t.offsetHeight,o=fe(t),s=ht.boxSizing&&"border-box"===pt.css(t,"boxSizing",!1,o);if(r<=0||null==r){if(r=me(t,e,o),(r<0||null==r)&&(r=t.style[e]),he.test(r))return r;n=s&&(ht.boxSizingReliable()||r===t.style[e]),r=parseFloat(r)||0}return r+j(t,e,i||(s?"border":"content"),n,o)+"px"}function Y(t,e,i,n,r){return new Y.prototype.init(t,e,i,n,r)}function H(){return t.setTimeout(function(){Me=void 0}),Me=pt.now()}function F(t,e){var i,n={height:t},r=0;for(e=e?1:0;r<4;r+=2-e)i=Yt[r],n["margin"+i]=n["padding"+i]=t;return e&&(n.opacity=n.width=t),n}function R(t,e,i){for(var n,r=(B.tweeners[e]||[]).concat(B.tweeners["*"]),o=0,s=r.length;o<s;o++)if(n=r[o].call(i,e,t))return n}function W(t,e,i){var n,r,o,s,a,l,u,c,h=this,d={},p=t.style,f=t.nodeType&&Ht(t),m=pt._data(t,"fxshow");i.queue||(a=pt._queueHooks(t,"fx"),null==a.unqueued&&(a.unqueued=0,l=a.empty.fire,a.empty.fire=function(){a.unqueued||l()}),a.unqueued++,h.always(function(){h.always(function(){a.unqueued--,pt.queue(t,"fx").length||a.empty.fire()})})),1===t.nodeType&&("height"in e||"width"in e)&&(i.overflow=[p.overflow,p.overflowX,p.overflowY],u=pt.css(t,"display"),c="none"===u?pt._data(t,"olddisplay")||A(t.nodeName):u,"inline"===c&&"none"===pt.css(t,"float")&&(ht.inlineBlockNeedsLayout&&"inline"!==A(t.nodeName)?p.zoom=1:p.display="inline-block")),i.overflow&&(p.overflow="hidden",ht.shrinkWrapBlocks()||h.always(function(){p.overflow=i.overflow[0],p.overflowX=i.overflow[1],p.overflowY=i.overflow[2]}));for(n in e)if(r=e[n],Se.exec(r)){if(delete e[n],o=o||"toggle"===r,r===(f?"hide":"show")){if("show"!==r||!m||void 0===m[n])continue;f=!0}d[n]=m&&m[n]||pt.style(t,n)}else u=void 0;if(pt.isEmptyObject(d))"inline"===("none"===u?A(t.nodeName):u)&&(p.display=u);else{m?"hidden"in m&&(f=m.hidden):m=pt._data(t,"fxshow",{}),o&&(m.hidden=!f),f?pt(t).show():h.done(function(){pt(t).hide()}),h.done(function(){var e;pt._removeData(t,"fxshow");for(e in d)pt.style(t,e,d[e])});for(n in d)s=R(f?m[n]:0,n,h),n in m||(m[n]=s.start,f&&(s.end=s.start,s.start="width"===n||"height"===n?1:0))}}function z(t,e){var i,n,r,o,s;for(i in t)if(n=pt.camelCase(i),r=e[n],o=t[i],pt.isArray(o)&&(r=o[1],o=t[i]=o[0]),i!==n&&(t[n]=o,delete t[i]),s=pt.cssHooks[n],s&&"expand"in s){o=s.expand(o),delete t[n];for(i in o)i in t||(t[i]=o[i],e[i]=r)}else e[n]=r}function B(t,e,i){var n,r,o=0,s=B.prefilters.length,a=pt.Deferred().always(function(){delete l.elem}),l=function(){if(r)return!1;for(var e=Me||H(),i=Math.max(0,u.startTime+u.duration-e),n=i/u.duration||0,o=1-n,s=0,l=u.tweens.length;s<l;s++)u.tweens[s].run(o);return a.notifyWith(t,[u,o,i]),o<1&&l?i:(a.resolveWith(t,[u]),!1)},u=a.promise({elem:t,props:pt.extend({},e),opts:pt.extend(!0,{specialEasing:{},easing:pt.easing._default},i),originalProperties:e,originalOptions:i,startTime:Me||H(),duration:i.duration,tweens:[],createTween:function(e,i){var n=pt.Tween(t,u.opts,e,i,u.opts.specialEasing[e]||u.opts.easing);return u.tweens.push(n),n},stop:function(e){var i=0,n=e?u.tweens.length:0;if(r)return this;for(r=!0;i<n;i++)u.tweens[i].run(1);return e?(a.notifyWith(t,[u,1,0]),a.resolveWith(t,[u,e])):a.rejectWith(t,[u,e]),this}}),c=u.props;for(z(c,u.opts.specialEasing);o<s;o++)if(n=B.prefilters[o].call(u,t,c,u.opts))return pt.isFunction(n.stop)&&(pt._queueHooks(u.elem,u.opts.queue).stop=pt.proxy(n.stop,n)),n;return pt.map(c,R,u),pt.isFunction(u.opts.start)&&u.opts.start.call(t,u),pt.fx.timer(pt.extend(l,{elem:t,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 $(t){return pt.attr(t,"class")||""}function q(t){return function(e,i){"string"!=typeof e&&(i=e,e="*");var n,r=0,o=e.toLowerCase().match(Lt)||[];if(pt.isFunction(i))for(;n=o[r++];)"+"===n.charAt(0)?(n=n.slice(1)||"*",(t[n]=t[n]||[]).unshift(i)):(t[n]=t[n]||[]).push(i)}}function U(t,e,i,n){function r(a){var l;return o[a]=!0,pt.each(t[a]||[],function(t,a){var u=a(e,i,n);return"string"!=typeof u||s||o[u]?s?!(l=u):void 0:(e.dataTypes.unshift(u),r(u),!1)}),l}var o={},s=t===Qe;return r(e.dataTypes[0])||!o["*"]&&r("*")}function V(t,e){var i,n,r=pt.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((r[n]?t:i||(i={}))[n]=e[n]);return i&&pt.extend(!0,t,i),t}function G(t,e,i){for(var n,r,o,s,a=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===r&&(r=t.mimeType||e.getResponseHeader("Content-Type"));if(r)for(s in a)if(a[s]&&a[s].test(r)){l.unshift(s);break}if(l[0]in i)o=l[0];else{for(s in i){if(!l[0]||t.converters[s+" "+l[0]]){o=s;break}n||(n=s)}o=o||n}if(o)return o!==l[0]&&l.unshift(o),i[o]}function X(t,e,i,n){var r,o,s,a,l,u={},c=t.dataTypes.slice();if(c[1])for(s in t.converters)u[s.toLowerCase()]=t.converters[s];for(o=c.shift();o;)if(t.responseFields[o]&&(i[t.responseFields[o]]=e),!l&&n&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(s=u[l+" "+o]||u["* "+o],!s)for(r in u)if(a=r.split(" "),a[1]===o&&(s=u[l+" "+a[0]]||u["* "+a[0]])){s===!0?s=u[r]:u[r]!==!0&&(o=a[0],c.unshift(a[1]));break}if(s!==!0)if(s&&t["throws"])e=s(e);else try{e=s(e)}catch(t){return{state:"parsererror",error:s?t:"No conversion from "+l+" to "+o}}}return{state:"success",data:e}}function J(t){return t.style&&t.style.display||pt.css(t,"display")}function K(t){if(!pt.contains(t.ownerDocument||nt,t))return!0;for(;t&&1===t.nodeType;){if("none"===J(t)||"hidden"===t.type)return!0;t=t.parentNode}return!1}function Q(t,e,i,n){var r;if(pt.isArray(e))pt.each(e,function(e,r){i||ni.test(t)?n(t,r):Q(t+"["+("object"==typeof r&&null!=r?e:"")+"]",r,i,n)});else if(i||"object"!==pt.type(e))n(t,e);else for(r in e)Q(t+"["+r+"]",e[r],i,n)}function Z(){try{return new t.XMLHttpRequest}catch(t){}}function tt(){try{return new t.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function et(t){return pt.isWindow(t)?t:9===t.nodeType&&(t.defaultView||t.parentWindow)}var it=[],nt=t.document,rt=it.slice,ot=it.concat,st=it.push,at=it.indexOf,lt={},ut=lt.toString,ct=lt.hasOwnProperty,ht={},dt="1.12.4",pt=function(t,e){return new pt.fn.init(t,e)},ft=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,mt=/^-ms-/,gt=/-([\da-z])/gi,vt=function(t,e){return e.toUpperCase()};pt.fn=pt.prototype={jquery:dt,constructor:pt,selector:"",length:0,toArray:function(){return rt.call(this)},get:function(t){return null!=t?t<0?this[t+this.length]:this[t]:rt.call(this)},pushStack:function(t){var e=pt.merge(this.constructor(),t);return e.prevObject=this,e.context=this.context,e},each:function(t){return pt.each(this,t)},map:function(t){return this.pushStack(pt.map(this,function(e,i){return t.call(e,i,e)}))},slice:function(){return this.pushStack(rt.apply(this,arguments));
},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,i=+t+(t<0?e:0);return this.pushStack(i>=0&&i<e?[this[i]]:[])},end:function(){return this.prevObject||this.constructor()},push:st,sort:it.sort,splice:it.splice},pt.extend=pt.fn.extend=function(){var t,e,i,n,r,o,s=arguments[0]||{},a=1,l=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[a]||{},a++),"object"==typeof s||pt.isFunction(s)||(s={}),a===l&&(s=this,a--);a<l;a++)if(null!=(r=arguments[a]))for(n in r)t=s[n],i=r[n],s!==i&&(u&&i&&(pt.isPlainObject(i)||(e=pt.isArray(i)))?(e?(e=!1,o=t&&pt.isArray(t)?t:[]):o=t&&pt.isPlainObject(t)?t:{},s[n]=pt.extend(u,o,i)):void 0!==i&&(s[n]=i));return s},pt.extend({expando:"jQuery"+(dt+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isFunction:function(t){return"function"===pt.type(t)},isArray:Array.isArray||function(t){return"array"===pt.type(t)},isWindow:function(t){return null!=t&&t==t.window},isNumeric:function(t){var e=t&&t.toString();return!pt.isArray(t)&&e-parseFloat(e)+1>=0},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},isPlainObject:function(t){var e;if(!t||"object"!==pt.type(t)||t.nodeType||pt.isWindow(t))return!1;try{if(t.constructor&&!ct.call(t,"constructor")&&!ct.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}if(!ht.ownFirst)for(e in t)return ct.call(t,e);for(e in t);return void 0===e||ct.call(t,e)},type:function(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?lt[ut.call(t)]||"object":typeof t},globalEval:function(e){e&&pt.trim(e)&&(t.execScript||function(e){t.eval.call(t,e)})(e)},camelCase:function(t){return t.replace(mt,"ms-").replace(gt,vt)},nodeName:function(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()},each:function(t,e){var n,r=0;if(i(t))for(n=t.length;r<n&&e.call(t[r],r,t[r])!==!1;r++);else for(r in t)if(e.call(t[r],r,t[r])===!1)break;return t},trim:function(t){return null==t?"":(t+"").replace(ft,"")},makeArray:function(t,e){var n=e||[];return null!=t&&(i(Object(t))?pt.merge(n,"string"==typeof t?[t]:t):st.call(n,t)),n},inArray:function(t,e,i){var n;if(e){if(at)return at.call(e,t,i);for(n=e.length,i=i?i<0?Math.max(0,n+i):i:0;i<n;i++)if(i in e&&e[i]===t)return i}return-1},merge:function(t,e){for(var i=+e.length,n=0,r=t.length;n<i;)t[r++]=e[n++];if(i!==i)for(;void 0!==e[n];)t[r++]=e[n++];return t.length=r,t},grep:function(t,e,i){for(var n,r=[],o=0,s=t.length,a=!i;o<s;o++)n=!e(t[o],o),n!==a&&r.push(t[o]);return r},map:function(t,e,n){var r,o,s=0,a=[];if(i(t))for(r=t.length;s<r;s++)o=e(t[s],s,n),null!=o&&a.push(o);else for(s in t)o=e(t[s],s,n),null!=o&&a.push(o);return ot.apply([],a)},guid:1,proxy:function(t,e){var i,n,r;if("string"==typeof e&&(r=t[e],e=t,t=r),pt.isFunction(t))return i=rt.call(arguments,2),n=function(){return t.apply(e||this,i.concat(rt.call(arguments)))},n.guid=t.guid=t.guid||pt.guid++,n},now:function(){return+new Date},support:ht}),"function"==typeof Symbol&&(pt.fn[Symbol.iterator]=it[Symbol.iterator]),pt.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(t,e){lt["[object "+e+"]"]=e.toLowerCase()});var yt=function(t){function e(t,e,i,n){var r,o,s,a,l,u,h,p,f=e&&e.ownerDocument,m=e?e.nodeType:9;if(i=i||[],"string"!=typeof t||!t||1!==m&&9!==m&&11!==m)return i;if(!n&&((e?e.ownerDocument||e:R)!==I&&E(e),e=e||I,O)){if(11!==m&&(u=vt.exec(t)))if(r=u[1]){if(9===m){if(!(s=e.getElementById(r)))return i;if(s.id===r)return i.push(s),i}else if(f&&(s=f.getElementById(r))&&H(e,s)&&s.id===r)return i.push(s),i}else{if(u[2])return Q.apply(i,e.getElementsByTagName(t)),i;if((r=u[3])&&w.getElementsByClassName&&e.getElementsByClassName)return Q.apply(i,e.getElementsByClassName(r)),i}if(w.qsa&&!q[t+" "]&&(!j||!j.test(t))){if(1!==m)f=e,p=t;else if("object"!==e.nodeName.toLowerCase()){for((a=e.getAttribute("id"))?a=a.replace(bt,"\\$&"):e.setAttribute("id",a=F),h=M(t),o=h.length,l=dt.test(a)?"#"+a:"[id='"+a+"']";o--;)h[o]=l+" "+d(h[o]);p=h.join(","),f=yt.test(t)&&c(e.parentNode)||e}if(p)try{return Q.apply(i,f.querySelectorAll(p)),i}catch(t){}finally{a===F&&e.removeAttribute("id")}}}return S(t.replace(at,"$1"),e,i,n)}function i(){function t(i,n){return e.push(i+" ")>x.cacheLength&&delete t[e.shift()],t[i+" "]=n}var e=[];return t}function n(t){return t[F]=!0,t}function r(t){var e=I.createElement("div");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function o(t,e){for(var i=t.split("|"),n=i.length;n--;)x.attrHandle[i[n]]=e}function s(t,e){var i=e&&t,n=i&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||V)-(~t.sourceIndex||V);if(n)return n;if(i)for(;i=i.nextSibling;)if(i===e)return-1;return t?1:-1}function a(t){return function(e){var i=e.nodeName.toLowerCase();return"input"===i&&e.type===t}}function l(t){return function(e){var i=e.nodeName.toLowerCase();return("input"===i||"button"===i)&&e.type===t}}function u(t){return n(function(e){return e=+e,n(function(i,n){for(var r,o=t([],i.length,e),s=o.length;s--;)i[r=o[s]]&&(i[r]=!(n[r]=i[r]))})})}function c(t){return t&&"undefined"!=typeof t.getElementsByTagName&&t}function h(){}function d(t){for(var e=0,i=t.length,n="";e<i;e++)n+=t[e].value;return n}function p(t,e,i){var n=e.dir,r=i&&"parentNode"===n,o=z++;return e.first?function(e,i,o){for(;e=e[n];)if(1===e.nodeType||r)return t(e,i,o)}:function(e,i,s){var a,l,u,c=[W,o];if(s){for(;e=e[n];)if((1===e.nodeType||r)&&t(e,i,s))return!0}else for(;e=e[n];)if(1===e.nodeType||r){if(u=e[F]||(e[F]={}),l=u[e.uniqueID]||(u[e.uniqueID]={}),(a=l[n])&&a[0]===W&&a[1]===o)return c[2]=a[2];if(l[n]=c,c[2]=t(e,i,s))return!0}}}function f(t){return t.length>1?function(e,i,n){for(var r=t.length;r--;)if(!t[r](e,i,n))return!1;return!0}:t[0]}function m(t,i,n){for(var r=0,o=i.length;r<o;r++)e(t,i[r],n);return n}function g(t,e,i,n,r){for(var o,s=[],a=0,l=t.length,u=null!=e;a<l;a++)(o=t[a])&&(i&&!i(o,n,r)||(s.push(o),u&&e.push(a)));return s}function v(t,e,i,r,o,s){return r&&!r[F]&&(r=v(r)),o&&!o[F]&&(o=v(o,s)),n(function(n,s,a,l){var u,c,h,d=[],p=[],f=s.length,v=n||m(e||"*",a.nodeType?[a]:a,[]),y=!t||!n&&e?v:g(v,d,t,a,l),b=i?o||(n?t:f||r)?[]:s:y;if(i&&i(y,b,a,l),r)for(u=g(b,p),r(u,[],a,l),c=u.length;c--;)(h=u[c])&&(b[p[c]]=!(y[p[c]]=h));if(n){if(o||t){if(o){for(u=[],c=b.length;c--;)(h=b[c])&&u.push(y[c]=h);o(null,b=[],u,l)}for(c=b.length;c--;)(h=b[c])&&(u=o?tt(n,h):d[c])>-1&&(n[u]=!(s[u]=h))}}else b=g(b===s?b.splice(f,b.length):b),o?o(null,s,b,l):Q.apply(s,b)})}function y(t){for(var e,i,n,r=t.length,o=x.relative[t[0].type],s=o||x.relative[" "],a=o?1:0,l=p(function(t){return t===e},s,!0),u=p(function(t){return tt(e,t)>-1},s,!0),c=[function(t,i,n){var r=!o&&(n||i!==D)||((e=i).nodeType?l(t,i,n):u(t,i,n));return e=null,r}];a<r;a++)if(i=x.relative[t[a].type])c=[p(f(c),i)];else{if(i=x.filter[t[a].type].apply(null,t[a].matches),i[F]){for(n=++a;n<r&&!x.relative[t[n].type];n++);return v(a>1&&f(c),a>1&&d(t.slice(0,a-1).concat({value:" "===t[a-2].type?"*":""})).replace(at,"$1"),i,a<n&&y(t.slice(a,n)),n<r&&y(t=t.slice(n)),n<r&&d(t))}c.push(i)}return f(c)}function b(t,i){var r=i.length>0,o=t.length>0,s=function(n,s,a,l,u){var c,h,d,p=0,f="0",m=n&&[],v=[],y=D,b=n||o&&x.find.TAG("*",u),_=W+=null==y?1:Math.random()||.1,w=b.length;for(u&&(D=s===I||s||u);f!==w&&null!=(c=b[f]);f++){if(o&&c){for(h=0,s||c.ownerDocument===I||(E(c),a=!O);d=t[h++];)if(d(c,s||I,a)){l.push(c);break}u&&(W=_)}r&&((c=!d&&c)&&p--,n&&m.push(c))}if(p+=f,r&&f!==p){for(h=0;d=i[h++];)d(m,v,s,a);if(n){if(p>0)for(;f--;)m[f]||v[f]||(v[f]=J.call(l));v=g(v)}Q.apply(l,v),u&&!n&&v.length>0&&p+i.length>1&&e.uniqueSort(l)}return u&&(W=_,D=y),m};return r?n(s):s}var _,w,x,k,C,M,T,S,D,L,A,E,I,P,O,j,N,Y,H,F="sizzle"+1*new Date,R=t.document,W=0,z=0,B=i(),$=i(),q=i(),U=function(t,e){return t===e&&(A=!0),0},V=1<<31,G={}.hasOwnProperty,X=[],J=X.pop,K=X.push,Q=X.push,Z=X.slice,tt=function(t,e){for(var i=0,n=t.length;i<n;i++)if(t[i]===e)return i;return-1},et="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",it="[\\x20\\t\\r\\n\\f]",nt="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",rt="\\["+it+"*("+nt+")(?:"+it+"*([*^$|!~]?=)"+it+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+nt+"))|)"+it+"*\\]",ot=":("+nt+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+rt+")*)|.*)\\)|)",st=new RegExp(it+"+","g"),at=new RegExp("^"+it+"+|((?:^|[^\\\\])(?:\\\\.)*)"+it+"+$","g"),lt=new RegExp("^"+it+"*,"+it+"*"),ut=new RegExp("^"+it+"*([>+~]|"+it+")"+it+"*"),ct=new RegExp("="+it+"*([^\\]'\"]*?)"+it+"*\\]","g"),ht=new RegExp(ot),dt=new RegExp("^"+nt+"$"),pt={ID:new RegExp("^#("+nt+")"),CLASS:new RegExp("^\\.("+nt+")"),TAG:new RegExp("^("+nt+"|[*])"),ATTR:new RegExp("^"+rt),PSEUDO:new RegExp("^"+ot),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+it+"*(even|odd|(([+-]|)(\\d*)n|)"+it+"*(?:([+-]|)"+it+"*(\\d+)|))"+it+"*\\)|)","i"),bool:new RegExp("^(?:"+et+")$","i"),needsContext:new RegExp("^"+it+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+it+"*((?:-\\d)?\\d*)"+it+"*\\)|)(?=[^-]|$)","i")},ft=/^(?:input|select|textarea|button)$/i,mt=/^h\d$/i,gt=/^[^{]+\{\s*\[native \w/,vt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,yt=/[+~]/,bt=/'|\\/g,_t=new RegExp("\\\\([\\da-f]{1,6}"+it+"?|("+it+")|.)","ig"),wt=function(t,e,i){var n="0x"+e-65536;return n!==n||i?e:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)},xt=function(){E()};try{Q.apply(X=Z.call(R.childNodes),R.childNodes),X[R.childNodes.length].nodeType}catch(t){Q={apply:X.length?function(t,e){K.apply(t,Z.call(e))}:function(t,e){for(var i=t.length,n=0;t[i++]=e[n++];);t.length=i-1}}}w=e.support={},C=e.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},E=e.setDocument=function(t){var e,i,n=t?t.ownerDocument||t:R;return n!==I&&9===n.nodeType&&n.documentElement?(I=n,P=I.documentElement,O=!C(I),(i=I.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",xt,!1):i.attachEvent&&i.attachEvent("onunload",xt)),w.attributes=r(function(t){return t.className="i",!t.getAttribute("className")}),w.getElementsByTagName=r(function(t){return t.appendChild(I.createComment("")),!t.getElementsByTagName("*").length}),w.getElementsByClassName=gt.test(I.getElementsByClassName),w.getById=r(function(t){return P.appendChild(t).id=F,!I.getElementsByName||!I.getElementsByName(F).length}),w.getById?(x.find.ID=function(t,e){if("undefined"!=typeof e.getElementById&&O){var i=e.getElementById(t);return i?[i]:[]}},x.filter.ID=function(t){var e=t.replace(_t,wt);return function(t){return t.getAttribute("id")===e}}):(delete x.find.ID,x.filter.ID=function(t){var e=t.replace(_t,wt);return function(t){var i="undefined"!=typeof t.getAttributeNode&&t.getAttributeNode("id");return i&&i.value===e}}),x.find.TAG=w.getElementsByTagName?function(t,e){return"undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t):w.qsa?e.querySelectorAll(t):void 0}:function(t,e){var i,n=[],r=0,o=e.getElementsByTagName(t);if("*"===t){for(;i=o[r++];)1===i.nodeType&&n.push(i);return n}return o},x.find.CLASS=w.getElementsByClassName&&function(t,e){if("undefined"!=typeof e.getElementsByClassName&&O)return e.getElementsByClassName(t)},N=[],j=[],(w.qsa=gt.test(I.querySelectorAll))&&(r(function(t){P.appendChild(t).innerHTML="<a id='"+F+"'></a><select id='"+F+"-\r\\' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&j.push("[*^$]="+it+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||j.push("\\["+it+"*(?:value|"+et+")"),t.querySelectorAll("[id~="+F+"-]").length||j.push("~="),t.querySelectorAll(":checked").length||j.push(":checked"),t.querySelectorAll("a#"+F+"+*").length||j.push(".#.+[+~]")}),r(function(t){var e=I.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&j.push("name"+it+"*[*^$|!~]?="),t.querySelectorAll(":enabled").length||j.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),j.push(",.*:")})),(w.matchesSelector=gt.test(Y=P.matches||P.webkitMatchesSelector||P.mozMatchesSelector||P.oMatchesSelector||P.msMatchesSelector))&&r(function(t){w.disconnectedMatch=Y.call(t,"div"),Y.call(t,"[s!='']:x"),N.push("!=",ot)}),j=j.length&&new RegExp(j.join("|")),N=N.length&&new RegExp(N.join("|")),e=gt.test(P.compareDocumentPosition),H=e||gt.test(P.contains)?function(t,e){var i=9===t.nodeType?t.documentElement:t,n=e&&e.parentNode;return t===n||!(!n||1!==n.nodeType||!(i.contains?i.contains(n):t.compareDocumentPosition&&16&t.compareDocumentPosition(n)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},U=e?function(t,e){if(t===e)return A=!0,0;var i=!t.compareDocumentPosition-!e.compareDocumentPosition;return i?i:(i=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1,1&i||!w.sortDetached&&e.compareDocumentPosition(t)===i?t===I||t.ownerDocument===R&&H(R,t)?-1:e===I||e.ownerDocument===R&&H(R,e)?1:L?tt(L,t)-tt(L,e):0:4&i?-1:1)}:function(t,e){if(t===e)return A=!0,0;var i,n=0,r=t.parentNode,o=e.parentNode,a=[t],l=[e];if(!r||!o)return t===I?-1:e===I?1:r?-1:o?1:L?tt(L,t)-tt(L,e):0;if(r===o)return s(t,e);for(i=t;i=i.parentNode;)a.unshift(i);for(i=e;i=i.parentNode;)l.unshift(i);for(;a[n]===l[n];)n++;return n?s(a[n],l[n]):a[n]===R?-1:l[n]===R?1:0},I):I},e.matches=function(t,i){return e(t,null,null,i)},e.matchesSelector=function(t,i){if((t.ownerDocument||t)!==I&&E(t),i=i.replace(ct,"='$1']"),w.matchesSelector&&O&&!q[i+" "]&&(!N||!N.test(i))&&(!j||!j.test(i)))try{var n=Y.call(t,i);if(n||w.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(t){}return e(i,I,null,[t]).length>0},e.contains=function(t,e){return(t.ownerDocument||t)!==I&&E(t),H(t,e)},e.attr=function(t,e){(t.ownerDocument||t)!==I&&E(t);var i=x.attrHandle[e.toLowerCase()],n=i&&G.call(x.attrHandle,e.toLowerCase())?i(t,e,!O):void 0;return void 0!==n?n:w.attributes||!O?t.getAttribute(e):(n=t.getAttributeNode(e))&&n.specified?n.value:null},e.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},e.uniqueSort=function(t){var e,i=[],n=0,r=0;if(A=!w.detectDuplicates,L=!w.sortStable&&t.slice(0),t.sort(U),A){for(;e=t[r++];)e===t[r]&&(n=i.push(r));for(;n--;)t.splice(i[n],1)}return L=null,t},k=e.getText=function(t){var e,i="",n=0,r=t.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)i+=k(t)}else if(3===r||4===r)return t.nodeValue}else for(;e=t[n++];)i+=k(e);return i},x=e.selectors={cacheLength:50,createPseudo:n,match:pt,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(_t,wt),t[3]=(t[3]||t[4]||t[5]||"").replace(_t,wt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(t){var e,i=!t[6]&&t[2];return pt.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":i&&ht.test(i)&&(e=M(i,!0))&&(e=i.indexOf(")",i.length-e)-i.length)&&(t[0]=t[0].slice(0,e),t[2]=i.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(_t,wt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=B[t+" "];return e||(e=new RegExp("(^|"+it+")"+t+"("+it+"|$)"))&&B(t,function(t){return e.test("string"==typeof t.className&&t.className||"undefined"!=typeof t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,i,n){return function(r){var o=e.attr(r,t);return null==o?"!="===i:!i||(o+="","="===i?o===n:"!="===i?o!==n:"^="===i?n&&0===o.indexOf(n):"*="===i?n&&o.indexOf(n)>-1:"$="===i?n&&o.slice(-n.length)===n:"~="===i?(" "+o.replace(st," ")+" ").indexOf(n)>-1:"|="===i&&(o===n||o.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,i,n,r){var o="nth"!==t.slice(0,3),s="last"!==t.slice(-4),a="of-type"===e;return 1===n&&0===r?function(t){return!!t.parentNode}:function(e,i,l){var u,c,h,d,p,f,m=o!==s?"nextSibling":"previousSibling",g=e.parentNode,v=a&&e.nodeName.toLowerCase(),y=!l&&!a,b=!1;if(g){if(o){for(;m;){for(d=e;d=d[m];)if(a?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;f=m="only"===t&&!f&&"nextSibling"}return!0}if(f=[s?g.firstChild:g.lastChild],s&&y){for(d=g,h=d[F]||(d[F]={}),c=h[d.uniqueID]||(h[d.uniqueID]={}),u=c[t]||[],p=u[0]===W&&u[1],b=p&&u[2],d=p&&g.childNodes[p];d=++p&&d&&d[m]||(b=p=0)||f.pop();)if(1===d.nodeType&&++b&&d===e){c[t]=[W,p,b];break}}else if(y&&(d=e,h=d[F]||(d[F]={}),c=h[d.uniqueID]||(h[d.uniqueID]={}),u=c[t]||[],p=u[0]===W&&u[1],b=p),b===!1)for(;(d=++p&&d&&d[m]||(b=p=0)||f.pop())&&((a?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++b||(y&&(h=d[F]||(d[F]={}),c=h[d.uniqueID]||(h[d.uniqueID]={}),c[t]=[W,b]),d!==e)););return b-=r,b===n||b%n===0&&b/n>=0}}},PSEUDO:function(t,i){var r,o=x.pseudos[t]||x.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return o[F]?o(i):o.length>1?(r=[t,t,"",i],x.setFilters.hasOwnProperty(t.toLowerCase())?n(function(t,e){for(var n,r=o(t,i),s=r.length;s--;)n=tt(t,r[s]),t[n]=!(e[n]=r[s])}):function(t){return o(t,0,r)}):o}},pseudos:{not:n(function(t){var e=[],i=[],r=T(t.replace(at,"$1"));return r[F]?n(function(t,e,i,n){for(var o,s=r(t,null,n,[]),a=t.length;a--;)(o=s[a])&&(t[a]=!(e[a]=o))}):function(t,n,o){return e[0]=t,r(e,null,o,i),e[0]=null,!i.pop()}}),has:n(function(t){return function(i){return e(t,i).length>0}}),contains:n(function(t){return t=t.replace(_t,wt),function(e){return(e.textContent||e.innerText||k(e)).indexOf(t)>-1}}),lang:n(function(t){return dt.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(_t,wt).toLowerCase(),function(e){var i;do if(i=O?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return i=i.toLowerCase(),i===t||0===i.indexOf(t+"-");while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var i=t.location&&t.location.hash;return i&&i.slice(1)===e.id},root:function(t){return t===P},focus:function(t){return t===I.activeElement&&(!I.hasFocus||I.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return t.disabled===!1},disabled:function(t){return t.disabled===!0},checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,t.selected===!0},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!x.pseudos.empty(t)},header:function(t){return mt.test(t.nodeName)},input:function(t){return ft.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:u(function(){return[0]}),last:u(function(t,e){return[e-1]}),eq:u(function(t,e,i){return[i<0?i+e:i]}),even:u(function(t,e){for(var i=0;i<e;i+=2)t.push(i);return t}),odd:u(function(t,e){for(var i=1;i<e;i+=2)t.push(i);return t}),lt:u(function(t,e,i){for(var n=i<0?i+e:i;--n>=0;)t.push(n);return t}),gt:u(function(t,e,i){for(var n=i<0?i+e:i;++n<e;)t.push(n);return t})}},x.pseudos.nth=x.pseudos.eq;for(_ in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})x.pseudos[_]=a(_);for(_ in{submit:!0,reset:!0})x.pseudos[_]=l(_);return h.prototype=x.filters=x.pseudos,x.setFilters=new h,M=e.tokenize=function(t,i){var n,r,o,s,a,l,u,c=$[t+" "];if(c)return i?0:c.slice(0);for(a=t,l=[],u=x.preFilter;a;){n&&!(r=lt.exec(a))||(r&&(a=a.slice(r[0].length)||a),l.push(o=[])),n=!1,(r=ut.exec(a))&&(n=r.shift(),o.push({value:n,type:r[0].replace(at," ")}),a=a.slice(n.length));for(s in x.filter)!(r=pt[s].exec(a))||u[s]&&!(r=u[s](r))||(n=r.shift(),o.push({value:n,type:s,matches:r}),a=a.slice(n.length));if(!n)break}return i?a.length:a?e.error(t):$(t,l).slice(0)},T=e.compile=function(t,e){var i,n=[],r=[],o=q[t+" "];if(!o){for(e||(e=M(t)),i=e.length;i--;)o=y(e[i]),o[F]?n.push(o):r.push(o);o=q(t,b(r,n)),o.selector=t}return o},S=e.select=function(t,e,i,n){var r,o,s,a,l,u="function"==typeof t&&t,h=!n&&M(t=u.selector||t);if(i=i||[],1===h.length){if(o=h[0]=h[0].slice(0),o.length>2&&"ID"===(s=o[0]).type&&w.getById&&9===e.nodeType&&O&&x.relative[o[1].type]){if(e=(x.find.ID(s.matches[0].replace(_t,wt),e)||[])[0],!e)return i;u&&(e=e.parentNode),t=t.slice(o.shift().value.length)}for(r=pt.needsContext.test(t)?0:o.length;r--&&(s=o[r],!x.relative[a=s.type]);)if((l=x.find[a])&&(n=l(s.matches[0].replace(_t,wt),yt.test(o[0].type)&&c(e.parentNode)||e))){if(o.splice(r,1),t=n.length&&d(o),!t)return Q.apply(i,n),i;break}}return(u||T(t,h))(n,e,!O,i,!e||yt.test(t)&&c(e.parentNode)||e),i},w.sortStable=F.split("").sort(U).join("")===F,w.detectDuplicates=!!A,E(),w.sortDetached=r(function(t){return 1&t.compareDocumentPosition(I.createElement("div"))}),r(function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")})||o("type|href|height|width",function(t,e,i){if(!i)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),w.attributes&&r(function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||o("value",function(t,e,i){if(!i&&"input"===t.nodeName.toLowerCase())return t.defaultValue}),r(function(t){return null==t.getAttribute("disabled")})||o(et,function(t,e,i){var n;if(!i)return t[e]===!0?e.toLowerCase():(n=t.getAttributeNode(e))&&n.specified?n.value:null}),e}(t);pt.find=yt,pt.expr=yt.selectors,pt.expr[":"]=pt.expr.pseudos,pt.uniqueSort=pt.unique=yt.uniqueSort,pt.text=yt.getText,pt.isXMLDoc=yt.isXML,pt.contains=yt.contains;var bt=function(t,e,i){for(var n=[],r=void 0!==i;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(r&&pt(t).is(i))break;n.push(t)}return n},_t=function(t,e){for(var i=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&i.push(t);return i},wt=pt.expr.match.needsContext,xt=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,kt=/^.[^:#\[\.,]*$/;pt.filter=function(t,e,i){var n=e[0];return i&&(t=":not("+t+")"),1===e.length&&1===n.nodeType?pt.find.matchesSelector(n,t)?[n]:[]:pt.find.matches(t,pt.grep(e,function(t){return 1===t.nodeType}))},pt.fn.extend({find:function(t){var e,i=[],n=this,r=n.length;if("string"!=typeof t)return this.pushStack(pt(t).filter(function(){for(e=0;e<r;e++)if(pt.contains(n[e],this))return!0}));for(e=0;e<r;e++)pt.find(t,n[e],i);return i=this.pushStack(r>1?pt.unique(i):i),i.selector=this.selector?this.selector+" "+t:t,i},filter:function(t){return this.pushStack(n(this,t||[],!1))},not:function(t){return this.pushStack(n(this,t||[],!0))},is:function(t){return!!n(this,"string"==typeof t&&wt.test(t)?pt(t):t||[],!1).length}});var Ct,Mt=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,Tt=pt.fn.init=function(t,e,i){var n,r;if(!t)return this;if(i=i||Ct,"string"==typeof t){if(n="<"===t.charAt(0)&&">"===t.charAt(t.length-1)&&t.length>=3?[null,t,null]:Mt.exec(t),!n||!n[1]&&e)return!e||e.jquery?(e||i).find(t):this.constructor(e).find(t);if(n[1]){if(e=e instanceof pt?e[0]:e,pt.merge(this,pt.parseHTML(n[1],e&&e.nodeType?e.ownerDocument||e:nt,!0)),xt.test(n[1])&&pt.isPlainObject(e))for(n in e)pt.isFunction(this[n])?this[n](e[n]):this.attr(n,e[n]);return this}if(r=nt.getElementById(n[2]),r&&r.parentNode){if(r.id!==n[2])return Ct.find(t);this.length=1,this[0]=r}return this.context=nt,this.selector=t,this}return t.nodeType?(this.context=this[0]=t,this.length=1,this):pt.isFunction(t)?"undefined"!=typeof i.ready?i.ready(t):t(pt):(void 0!==t.selector&&(this.selector=t.selector,this.context=t.context),pt.makeArray(t,this))};Tt.prototype=pt.fn,Ct=pt(nt);var St=/^(?:parents|prev(?:Until|All))/,Dt={children:!0,contents:!0,next:!0,prev:!0};pt.fn.extend({has:function(t){var e,i=pt(t,this),n=i.length;return this.filter(function(){for(e=0;e<n;e++)if(pt.contains(this,i[e]))return!0})},closest:function(t,e){for(var i,n=0,r=this.length,o=[],s=wt.test(t)||"string"!=typeof t?pt(t,e||this.context):0;n<r;n++)for(i=this[n];i&&i!==e;i=i.parentNode)if(i.nodeType<11&&(s?s.index(i)>-1:1===i.nodeType&&pt.find.matchesSelector(i,t))){o.push(i);break}return this.pushStack(o.length>1?pt.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?pt.inArray(this[0],pt(t)):pt.inArray(t.jquery?t[0]:t,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(pt.uniqueSort(pt.merge(this.get(),pt(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),pt.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return bt(t,"parentNode")},parentsUntil:function(t,e,i){return bt(t,"parentNode",i)},next:function(t){return r(t,"nextSibling")},prev:function(t){return r(t,"previousSibling")},nextAll:function(t){return bt(t,"nextSibling")},prevAll:function(t){return bt(t,"previousSibling")},nextUntil:function(t,e,i){return bt(t,"nextSibling",i)},prevUntil:function(t,e,i){return bt(t,"previousSibling",i)},siblings:function(t){return _t((t.parentNode||{}).firstChild,t)},children:function(t){return _t(t.firstChild)},contents:function(t){return pt.nodeName(t,"iframe")?t.contentDocument||t.contentWindow.document:pt.merge([],t.childNodes)}},function(t,e){pt.fn[t]=function(i,n){var r=pt.map(this,e,i);return"Until"!==t.slice(-5)&&(n=i),n&&"string"==typeof n&&(r=pt.filter(n,r)),this.length>1&&(Dt[t]||(r=pt.uniqueSort(r)),St.test(t)&&(r=r.reverse())),this.pushStack(r)}});var Lt=/\S+/g;pt.Callbacks=function(t){t="string"==typeof t?o(t):pt.extend({},t);var e,i,n,r,s=[],a=[],l=-1,u=function(){for(r=t.once,n=e=!0;a.length;l=-1)for(i=a.shift();++l<s.length;)s[l].apply(i[0],i[1])===!1&&t.stopOnFalse&&(l=s.length,i=!1);t.memory||(i=!1),e=!1,r&&(s=i?[]:"")},c={add:function(){return s&&(i&&!e&&(l=s.length-1,a.push(i)),function e(i){pt.each(i,function(i,n){pt.isFunction(n)?t.unique&&c.has(n)||s.push(n):n&&n.length&&"string"!==pt.type(n)&&e(n)})}(arguments),i&&!e&&u()),this},remove:function(){return pt.each(arguments,function(t,e){for(var i;(i=pt.inArray(e,s,i))>-1;)s.splice(i,1),i<=l&&l--}),this},has:function(t){return t?pt.inArray(t,s)>-1:s.length>0},empty:function(){return s&&(s=[]),this},disable:function(){return r=a=[],s=i="",this},disabled:function(){return!s},lock:function(){return r=!0,i||c.disable(),this},locked:function(){return!!r},fireWith:function(t,i){return r||(i=i||[],i=[t,i.slice?i.slice():i],a.push(i),e||u()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!n}};return c},pt.extend({Deferred:function(t){var e=[["resolve","done",pt.Callbacks("once memory"),"resolved"],["reject","fail",pt.Callbacks("once memory"),"rejected"],["notify","progress",pt.Callbacks("memory")]],i="pending",n={state:function(){return i},always:function(){return r.done(arguments).fail(arguments),this},then:function(){var t=arguments;return pt.Deferred(function(i){pt.each(e,function(e,o){var s=pt.isFunction(t[e])&&t[e];r[o[1]](function(){var t=s&&s.apply(this,arguments);t&&pt.isFunction(t.promise)?t.promise().progress(i.notify).done(i.resolve).fail(i.reject):i[o[0]+"With"](this===n?i.promise():this,s?[t]:arguments)})}),t=null}).promise()},promise:function(t){return null!=t?pt.extend(t,n):n}},r={};return n.pipe=n.then,pt.each(e,function(t,o){var s=o[2],a=o[3];n[o[1]]=s.add,a&&s.add(function(){i=a},e[1^t][2].disable,e[2][2].lock),r[o[0]]=function(){return r[o[0]+"With"](this===r?n:this,arguments),this},r[o[0]+"With"]=s.fireWith}),n.promise(r),t&&t.call(r,r),r},when:function(t){var e,i,n,r=0,o=rt.call(arguments),s=o.length,a=1!==s||t&&pt.isFunction(t.promise)?s:0,l=1===a?t:pt.Deferred(),u=function(t,i,n){return function(r){i[t]=this,n[t]=arguments.length>1?rt.call(arguments):r,n===e?l.notifyWith(i,n):--a||l.resolveWith(i,n)}};if(s>1)for(e=new Array(s),i=new Array(s),n=new Array(s);r<s;r++)o[r]&&pt.isFunction(o[r].promise)?o[r].promise().progress(u(r,i,e)).done(u(r,n,o)).fail(l.reject):--a;return a||l.resolveWith(n,o),l.promise()}});var At;pt.fn.ready=function(t){return pt.ready.promise().done(t),this},pt.extend({isReady:!1,readyWait:1,holdReady:function(t){t?pt.readyWait++:pt.ready(!0)},ready:function(t){(t===!0?--pt.readyWait:pt.isReady)||(pt.isReady=!0,t!==!0&&--pt.readyWait>0||(At.resolveWith(nt,[pt]),pt.fn.triggerHandler&&(pt(nt).triggerHandler("ready"),pt(nt).off("ready"))))}}),pt.ready.promise=function(e){if(!At)if(At=pt.Deferred(),"complete"===nt.readyState||"loading"!==nt.readyState&&!nt.documentElement.doScroll)t.setTimeout(pt.ready);else if(nt.addEventListener)nt.addEventListener("DOMContentLoaded",a),t.addEventListener("load",a);else{nt.attachEvent("onreadystatechange",a),t.attachEvent("onload",a);var i=!1;try{i=null==t.frameElement&&nt.documentElement}catch(t){}i&&i.doScroll&&!function e(){if(!pt.isReady){try{i.doScroll("left")}catch(i){return t.setTimeout(e,50)}s(),pt.ready()}}()}return At.promise(e)},pt.ready.promise();var Et;for(Et in pt(ht))break;ht.ownFirst="0"===Et,ht.inlineBlockNeedsLayout=!1,pt(function(){var t,e,i,n;i=nt.getElementsByTagName("body")[0],i&&i.style&&(e=nt.createElement("div"),n=nt.createElement("div"),n.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",i.appendChild(n).appendChild(e),"undefined"!=typeof e.style.zoom&&(e.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",ht.inlineBlockNeedsLayout=t=3===e.offsetWidth,t&&(i.style.zoom=1)),i.removeChild(n))}),function(){var t=nt.createElement("div");ht.deleteExpando=!0;try{delete t.test}catch(t){ht.deleteExpando=!1}t=null}();var It=function(t){var e=pt.noData[(t.nodeName+" ").toLowerCase()],i=+t.nodeType||1;return(1===i||9===i)&&(!e||e!==!0&&t.getAttribute("classid")===e)},Pt=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Ot=/([A-Z])/g;pt.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(t){return t=t.nodeType?pt.cache[t[pt.expando]]:t[pt.expando],!!t&&!u(t)},data:function(t,e,i){return c(t,e,i)},removeData:function(t,e){return h(t,e)},_data:function(t,e,i){return c(t,e,i,!0)},_removeData:function(t,e){return h(t,e,!0)}}),pt.fn.extend({data:function(t,e){var i,n,r,o=this[0],s=o&&o.attributes;if(void 0===t){if(this.length&&(r=pt.data(o),1===o.nodeType&&!pt._data(o,"parsedAttrs"))){for(i=s.length;i--;)s[i]&&(n=s[i].name,0===n.indexOf("data-")&&(n=pt.camelCase(n.slice(5)),l(o,n,r[n])));pt._data(o,"parsedAttrs",!0)}return r}return"object"==typeof t?this.each(function(){pt.data(this,t)}):arguments.length>1?this.each(function(){pt.data(this,t,e)}):o?l(o,t,pt.data(o,t)):void 0},removeData:function(t){return this.each(function(){pt.removeData(this,t)})}}),pt.extend({queue:function(t,e,i){var n;if(t)return e=(e||"fx")+"queue",n=pt._data(t,e),i&&(!n||pt.isArray(i)?n=pt._data(t,e,pt.makeArray(i)):n.push(i)),n||[]},dequeue:function(t,e){e=e||"fx";var i=pt.queue(t,e),n=i.length,r=i.shift(),o=pt._queueHooks(t,e),s=function(){pt.dequeue(t,e)};"inprogress"===r&&(r=i.shift(),n--),r&&("fx"===e&&i.unshift("inprogress"),delete o.stop,r.call(t,s,o)),!n&&o&&o.empty.fire()},_queueHooks:function(t,e){var i=e+"queueHooks";return pt._data(t,i)||pt._data(t,i,{empty:pt.Callbacks("once memory").add(function(){pt._removeData(t,e+"queue"),pt._removeData(t,i)})})}}),pt.fn.extend({queue:function(t,e){var i=2;return"string"!=typeof t&&(e=t,t="fx",i--),arguments.length<i?pt.queue(this[0],t):void 0===e?this:this.each(function(){var i=pt.queue(this,t,e);pt._queueHooks(this,t),"fx"===t&&"inprogress"!==i[0]&&pt.dequeue(this,t)})},dequeue:function(t){return this.each(function(){pt.dequeue(this,t)})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var i,n=1,r=pt.Deferred(),o=this,s=this.length,a=function(){--n||r.resolveWith(o,[o])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";s--;)i=pt._data(o[s],t+"queueHooks"),i&&i.empty&&(n++,i.empty.add(a));return a(),r.promise(e)}}),function(){var t;ht.shrinkWrapBlocks=function(){if(null!=t)return t;t=!1;var e,i,n;return i=nt.getElementsByTagName("body")[0],i&&i.style?(e=nt.createElement("div"),n=nt.createElement("div"),n.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",i.appendChild(n).appendChild(e),"undefined"!=typeof e.style.zoom&&(e.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",e.appendChild(nt.createElement("div")).style.width="5px",t=3!==e.offsetWidth),i.removeChild(n),t):void 0}}();var jt=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Nt=new RegExp("^(?:([+-])=|)("+jt+")([a-z%]*)$","i"),Yt=["Top","Right","Bottom","Left"],Ht=function(t,e){
return t=e||t,"none"===pt.css(t,"display")||!pt.contains(t.ownerDocument,t)},Ft=function(t,e,i,n,r,o,s){var a=0,l=t.length,u=null==i;if("object"===pt.type(i)){r=!0;for(a in i)Ft(t,e,a,i[a],!0,o,s)}else if(void 0!==n&&(r=!0,pt.isFunction(n)||(s=!0),u&&(s?(e.call(t,n),e=null):(u=e,e=function(t,e,i){return u.call(pt(t),i)})),e))for(;a<l;a++)e(t[a],i,s?n:n.call(t[a],a,e(t[a],i)));return r?t:u?e.call(t):l?e(t[0],i):o},Rt=/^(?:checkbox|radio)$/i,Wt=/<([\w:-]+)/,zt=/^$|\/(?:java|ecma)script/i,Bt=/^\s+/,$t="abbr|article|aside|audio|bdi|canvas|data|datalist|details|dialog|figcaption|figure|footer|header|hgroup|main|mark|meter|nav|output|picture|progress|section|summary|template|time|video";!function(){var t=nt.createElement("div"),e=nt.createDocumentFragment(),i=nt.createElement("input");t.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",ht.leadingWhitespace=3===t.firstChild.nodeType,ht.tbody=!t.getElementsByTagName("tbody").length,ht.htmlSerialize=!!t.getElementsByTagName("link").length,ht.html5Clone="<:nav></:nav>"!==nt.createElement("nav").cloneNode(!0).outerHTML,i.type="checkbox",i.checked=!0,e.appendChild(i),ht.appendChecked=i.checked,t.innerHTML="<textarea>x</textarea>",ht.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue,e.appendChild(t),i=nt.createElement("input"),i.setAttribute("type","radio"),i.setAttribute("checked","checked"),i.setAttribute("name","t"),t.appendChild(i),ht.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,ht.noCloneEvent=!!t.addEventListener,t[pt.expando]=1,ht.attributes=!t.getAttribute(pt.expando)}();var qt={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:ht.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]};qt.optgroup=qt.option,qt.tbody=qt.tfoot=qt.colgroup=qt.caption=qt.thead,qt.th=qt.td;var Ut=/<|&#?\w+;/,Vt=/<tbody/i;!function(){var e,i,n=nt.createElement("div");for(e in{submit:!0,change:!0,focusin:!0})i="on"+e,(ht[e]=i in t)||(n.setAttribute(i,"t"),ht[e]=n.attributes[i].expando===!1);n=null}();var Gt=/^(?:input|select|textarea)$/i,Xt=/^key/,Jt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Kt=/^(?:focusinfocus|focusoutblur)$/,Qt=/^([^.]*)(?:\.(.+)|)/;pt.event={global:{},add:function(t,e,i,n,r){var o,s,a,l,u,c,h,d,p,f,m,g=pt._data(t);if(g){for(i.handler&&(l=i,i=l.handler,r=l.selector),i.guid||(i.guid=pt.guid++),(s=g.events)||(s=g.events={}),(c=g.handle)||(c=g.handle=function(t){return"undefined"==typeof pt||t&&pt.event.triggered===t.type?void 0:pt.event.dispatch.apply(c.elem,arguments)},c.elem=t),e=(e||"").match(Lt)||[""],a=e.length;a--;)o=Qt.exec(e[a])||[],p=m=o[1],f=(o[2]||"").split(".").sort(),p&&(u=pt.event.special[p]||{},p=(r?u.delegateType:u.bindType)||p,u=pt.event.special[p]||{},h=pt.extend({type:p,origType:m,data:n,handler:i,guid:i.guid,selector:r,needsContext:r&&pt.expr.match.needsContext.test(r),namespace:f.join(".")},l),(d=s[p])||(d=s[p]=[],d.delegateCount=0,u.setup&&u.setup.call(t,n,f,c)!==!1||(t.addEventListener?t.addEventListener(p,c,!1):t.attachEvent&&t.attachEvent("on"+p,c))),u.add&&(u.add.call(t,h),h.handler.guid||(h.handler.guid=i.guid)),r?d.splice(d.delegateCount++,0,h):d.push(h),pt.event.global[p]=!0);t=null}},remove:function(t,e,i,n,r){var o,s,a,l,u,c,h,d,p,f,m,g=pt.hasData(t)&&pt._data(t);if(g&&(c=g.events)){for(e=(e||"").match(Lt)||[""],u=e.length;u--;)if(a=Qt.exec(e[u])||[],p=m=a[1],f=(a[2]||"").split(".").sort(),p){for(h=pt.event.special[p]||{},p=(n?h.delegateType:h.bindType)||p,d=c[p]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=d.length;o--;)s=d[o],!r&&m!==s.origType||i&&i.guid!==s.guid||a&&!a.test(s.namespace)||n&&n!==s.selector&&("**"!==n||!s.selector)||(d.splice(o,1),s.selector&&d.delegateCount--,h.remove&&h.remove.call(t,s));l&&!d.length&&(h.teardown&&h.teardown.call(t,f,g.handle)!==!1||pt.removeEvent(t,p,g.handle),delete c[p])}else for(p in c)pt.event.remove(t,p+e[u],i,n,!0);pt.isEmptyObject(c)&&(delete g.handle,pt._removeData(t,"events"))}},trigger:function(e,i,n,r){var o,s,a,l,u,c,h,d=[n||nt],p=ct.call(e,"type")?e.type:e,f=ct.call(e,"namespace")?e.namespace.split("."):[];if(a=c=n=n||nt,3!==n.nodeType&&8!==n.nodeType&&!Kt.test(p+pt.event.triggered)&&(p.indexOf(".")>-1&&(f=p.split("."),p=f.shift(),f.sort()),s=p.indexOf(":")<0&&"on"+p,e=e[pt.expando]?e:new pt.Event(p,"object"==typeof e&&e),e.isTrigger=r?2:3,e.namespace=f.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),i=null==i?[e]:pt.makeArray(i,[e]),u=pt.event.special[p]||{},r||!u.trigger||u.trigger.apply(n,i)!==!1)){if(!r&&!u.noBubble&&!pt.isWindow(n)){for(l=u.delegateType||p,Kt.test(l+p)||(a=a.parentNode);a;a=a.parentNode)d.push(a),c=a;c===(n.ownerDocument||nt)&&d.push(c.defaultView||c.parentWindow||t)}for(h=0;(a=d[h++])&&!e.isPropagationStopped();)e.type=h>1?l:u.bindType||p,o=(pt._data(a,"events")||{})[e.type]&&pt._data(a,"handle"),o&&o.apply(a,i),o=s&&a[s],o&&o.apply&&It(a)&&(e.result=o.apply(a,i),e.result===!1&&e.preventDefault());if(e.type=p,!r&&!e.isDefaultPrevented()&&(!u._default||u._default.apply(d.pop(),i)===!1)&&It(n)&&s&&n[p]&&!pt.isWindow(n)){c=n[s],c&&(n[s]=null),pt.event.triggered=p;try{n[p]()}catch(t){}pt.event.triggered=void 0,c&&(n[s]=c)}return e.result}},dispatch:function(t){t=pt.event.fix(t);var e,i,n,r,o,s=[],a=rt.call(arguments),l=(pt._data(this,"events")||{})[t.type]||[],u=pt.event.special[t.type]||{};if(a[0]=t,t.delegateTarget=this,!u.preDispatch||u.preDispatch.call(this,t)!==!1){for(s=pt.event.handlers.call(this,t,l),e=0;(r=s[e++])&&!t.isPropagationStopped();)for(t.currentTarget=r.elem,i=0;(o=r.handlers[i++])&&!t.isImmediatePropagationStopped();)t.rnamespace&&!t.rnamespace.test(o.namespace)||(t.handleObj=o,t.data=o.data,n=((pt.event.special[o.origType]||{}).handle||o.handler).apply(r.elem,a),void 0!==n&&(t.result=n)===!1&&(t.preventDefault(),t.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,t),t.result}},handlers:function(t,e){var i,n,r,o,s=[],a=e.delegateCount,l=t.target;if(a&&l.nodeType&&("click"!==t.type||isNaN(t.button)||t.button<1))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==t.type)){for(n=[],i=0;i<a;i++)o=e[i],r=o.selector+" ",void 0===n[r]&&(n[r]=o.needsContext?pt(r,this).index(l)>-1:pt.find(r,this,null,[l]).length),n[r]&&n.push(o);n.length&&s.push({elem:l,handlers:n})}return a<e.length&&s.push({elem:this,handlers:e.slice(a)}),s},fix:function(t){if(t[pt.expando])return t;var e,i,n,r=t.type,o=t,s=this.fixHooks[r];for(s||(this.fixHooks[r]=s=Jt.test(r)?this.mouseHooks:Xt.test(r)?this.keyHooks:{}),n=s.props?this.props.concat(s.props):this.props,t=new pt.Event(o),e=n.length;e--;)i=n[e],t[i]=o[i];return t.target||(t.target=o.srcElement||nt),3===t.target.nodeType&&(t.target=t.target.parentNode),t.metaKey=!!t.metaKey,s.filter?s.filter(t,o):t},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(t,e){return null==t.which&&(t.which=null!=e.charCode?e.charCode:e.keyCode),t}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(t,e){var i,n,r,o=e.button,s=e.fromElement;return null==t.pageX&&null!=e.clientX&&(n=t.target.ownerDocument||nt,r=n.documentElement,i=n.body,t.pageX=e.clientX+(r&&r.scrollLeft||i&&i.scrollLeft||0)-(r&&r.clientLeft||i&&i.clientLeft||0),t.pageY=e.clientY+(r&&r.scrollTop||i&&i.scrollTop||0)-(r&&r.clientTop||i&&i.clientTop||0)),!t.relatedTarget&&s&&(t.relatedTarget=s===t.target?e.toElement:s),t.which||void 0===o||(t.which=1&o?1:2&o?3:4&o?2:0),t}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==_()&&this.focus)try{return this.focus(),!1}catch(t){}},delegateType:"focusin"},blur:{trigger:function(){if(this===_()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if(pt.nodeName(this,"input")&&"checkbox"===this.type&&this.click)return this.click(),!1},_default:function(t){return pt.nodeName(t.target,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}},simulate:function(t,e,i){var n=pt.extend(new pt.Event,i,{type:t,isSimulated:!0});pt.event.trigger(n,null,e),n.isDefaultPrevented()&&i.preventDefault()}},pt.removeEvent=nt.removeEventListener?function(t,e,i){t.removeEventListener&&t.removeEventListener(e,i)}:function(t,e,i){var n="on"+e;t.detachEvent&&("undefined"==typeof t[n]&&(t[n]=null),t.detachEvent(n,i))},pt.Event=function(t,e){return this instanceof pt.Event?(t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&t.returnValue===!1?y:b):this.type=t,e&&pt.extend(this,e),this.timeStamp=t&&t.timeStamp||pt.now(),void(this[pt.expando]=!0)):new pt.Event(t,e)},pt.Event.prototype={constructor:pt.Event,isDefaultPrevented:b,isPropagationStopped:b,isImmediatePropagationStopped:b,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=y,t&&(t.preventDefault?t.preventDefault():t.returnValue=!1)},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=y,t&&!this.isSimulated&&(t.stopPropagation&&t.stopPropagation(),t.cancelBubble=!0)},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=y,t&&t.stopImmediatePropagation&&t.stopImmediatePropagation(),this.stopPropagation()}},pt.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(t,e){pt.event.special[t]={delegateType:e,bindType:e,handle:function(t){var i,n=this,r=t.relatedTarget,o=t.handleObj;return r&&(r===n||pt.contains(n,r))||(t.type=o.origType,i=o.handler.apply(this,arguments),t.type=e),i}}}),ht.submit||(pt.event.special.submit={setup:function(){return!pt.nodeName(this,"form")&&void pt.event.add(this,"click._submit keypress._submit",function(t){var e=t.target,i=pt.nodeName(e,"input")||pt.nodeName(e,"button")?pt.prop(e,"form"):void 0;i&&!pt._data(i,"submit")&&(pt.event.add(i,"submit._submit",function(t){t._submitBubble=!0}),pt._data(i,"submit",!0))})},postDispatch:function(t){t._submitBubble&&(delete t._submitBubble,this.parentNode&&!t.isTrigger&&pt.event.simulate("submit",this.parentNode,t))},teardown:function(){return!pt.nodeName(this,"form")&&void pt.event.remove(this,"._submit")}}),ht.change||(pt.event.special.change={setup:function(){return Gt.test(this.nodeName)?("checkbox"!==this.type&&"radio"!==this.type||(pt.event.add(this,"propertychange._change",function(t){"checked"===t.originalEvent.propertyName&&(this._justChanged=!0)}),pt.event.add(this,"click._change",function(t){this._justChanged&&!t.isTrigger&&(this._justChanged=!1),pt.event.simulate("change",this,t)})),!1):void pt.event.add(this,"beforeactivate._change",function(t){var e=t.target;Gt.test(e.nodeName)&&!pt._data(e,"change")&&(pt.event.add(e,"change._change",function(t){!this.parentNode||t.isSimulated||t.isTrigger||pt.event.simulate("change",this.parentNode,t)}),pt._data(e,"change",!0))})},handle:function(t){var e=t.target;if(this!==e||t.isSimulated||t.isTrigger||"radio"!==e.type&&"checkbox"!==e.type)return t.handleObj.handler.apply(this,arguments)},teardown:function(){return pt.event.remove(this,"._change"),!Gt.test(this.nodeName)}}),ht.focusin||pt.each({focus:"focusin",blur:"focusout"},function(t,e){var i=function(t){pt.event.simulate(e,t.target,pt.event.fix(t))};pt.event.special[e]={setup:function(){var n=this.ownerDocument||this,r=pt._data(n,e);r||n.addEventListener(t,i,!0),pt._data(n,e,(r||0)+1)},teardown:function(){var n=this.ownerDocument||this,r=pt._data(n,e)-1;r?pt._data(n,e,r):(n.removeEventListener(t,i,!0),pt._removeData(n,e))}}}),pt.fn.extend({on:function(t,e,i,n){return w(this,t,e,i,n)},one:function(t,e,i,n){return w(this,t,e,i,n,1)},off:function(t,e,i){var n,r;if(t&&t.preventDefault&&t.handleObj)return n=t.handleObj,pt(t.delegateTarget).off(n.namespace?n.origType+"."+n.namespace:n.origType,n.selector,n.handler),this;if("object"==typeof t){for(r in t)this.off(r,e,t[r]);return this}return e!==!1&&"function"!=typeof e||(i=e,e=void 0),i===!1&&(i=b),this.each(function(){pt.event.remove(this,t,i,e)})},trigger:function(t,e){return this.each(function(){pt.event.trigger(t,e,this)})},triggerHandler:function(t,e){var i=this[0];if(i)return pt.event.trigger(t,e,i,!0)}});var Zt=/ jQuery\d+="(?:null|\d+)"/g,te=new RegExp("<(?:"+$t+")[\\s/>]","i"),ee=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,ie=/<script|<style|<link/i,ne=/checked\s*(?:[^=]|=\s*.checked.)/i,re=/^true\/(.*)/,oe=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,se=p(nt),ae=se.appendChild(nt.createElement("div"));pt.extend({htmlPrefilter:function(t){return t.replace(ee,"<$1></$2>")},clone:function(t,e,i){var n,r,o,s,a,l=pt.contains(t.ownerDocument,t);if(ht.html5Clone||pt.isXMLDoc(t)||!te.test("<"+t.nodeName+">")?o=t.cloneNode(!0):(ae.innerHTML=t.outerHTML,ae.removeChild(o=ae.firstChild)),!(ht.noCloneEvent&&ht.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||pt.isXMLDoc(t)))for(n=f(o),a=f(t),s=0;null!=(r=a[s]);++s)n[s]&&T(r,n[s]);if(e)if(i)for(a=a||f(t),n=n||f(o),s=0;null!=(r=a[s]);s++)M(r,n[s]);else M(t,o);return n=f(o,"script"),n.length>0&&m(n,!l&&f(t,"script")),n=a=r=null,o},cleanData:function(t,e){for(var i,n,r,o,s=0,a=pt.expando,l=pt.cache,u=ht.attributes,c=pt.event.special;null!=(i=t[s]);s++)if((e||It(i))&&(r=i[a],o=r&&l[r])){if(o.events)for(n in o.events)c[n]?pt.event.remove(i,n):pt.removeEvent(i,n,o.handle);l[r]&&(delete l[r],u||"undefined"==typeof i.removeAttribute?i[a]=void 0:i.removeAttribute(a),it.push(r))}}}),pt.fn.extend({domManip:S,detach:function(t){return D(this,t,!0)},remove:function(t){return D(this,t)},text:function(t){return Ft(this,function(t){return void 0===t?pt.text(this):this.empty().append((this[0]&&this[0].ownerDocument||nt).createTextNode(t))},null,t,arguments.length)},append:function(){return S(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=x(this,t);e.appendChild(t)}})},prepend:function(){return S(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=x(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return S(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return S(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++){for(1===t.nodeType&&pt.cleanData(f(t,!1));t.firstChild;)t.removeChild(t.firstChild);t.options&&pt.nodeName(t,"select")&&(t.options.length=0)}return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return pt.clone(this,t,e)})},html:function(t){return Ft(this,function(t){var e=this[0]||{},i=0,n=this.length;if(void 0===t)return 1===e.nodeType?e.innerHTML.replace(Zt,""):void 0;if("string"==typeof t&&!ie.test(t)&&(ht.htmlSerialize||!te.test(t))&&(ht.leadingWhitespace||!Bt.test(t))&&!qt[(Wt.exec(t)||["",""])[1].toLowerCase()]){t=pt.htmlPrefilter(t);try{for(;i<n;i++)e=this[i]||{},1===e.nodeType&&(pt.cleanData(f(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var t=[];return S(this,arguments,function(e){var i=this.parentNode;pt.inArray(this,t)<0&&(pt.cleanData(f(this)),i&&i.replaceChild(e,this))},t)}}),pt.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){pt.fn[t]=function(t){for(var i,n=0,r=[],o=pt(t),s=o.length-1;n<=s;n++)i=n===s?this:this.clone(!0),pt(o[n])[e](i),st.apply(r,i.get());return this.pushStack(r)}});var le,ue={HTML:"block",BODY:"block"},ce=/^margin/,he=new RegExp("^("+jt+")(?!px)[a-z%]+$","i"),de=function(t,e,i,n){var r,o,s={};for(o in e)s[o]=t.style[o],t.style[o]=e[o];r=i.apply(t,n||[]);for(o in e)t.style[o]=s[o];return r},pe=nt.documentElement;!function(){function e(){var e,c,h=nt.documentElement;h.appendChild(l),u.style.cssText="-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",i=r=a=!1,n=s=!0,t.getComputedStyle&&(c=t.getComputedStyle(u),i="1%"!==(c||{}).top,a="2px"===(c||{}).marginLeft,r="4px"===(c||{width:"4px"}).width,u.style.marginRight="50%",n="4px"===(c||{marginRight:"4px"}).marginRight,e=u.appendChild(nt.createElement("div")),e.style.cssText=u.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",e.style.marginRight=e.style.width="0",u.style.width="1px",s=!parseFloat((t.getComputedStyle(e)||{}).marginRight),u.removeChild(e)),u.style.display="none",o=0===u.getClientRects().length,o&&(u.style.display="",u.innerHTML="<table><tr><td></td><td>t</td></tr></table>",u.childNodes[0].style.borderCollapse="separate",e=u.getElementsByTagName("td"),e[0].style.cssText="margin:0;border:0;padding:0;display:none",o=0===e[0].offsetHeight,o&&(e[0].style.display="",e[1].style.display="none",o=0===e[0].offsetHeight)),h.removeChild(l)}var i,n,r,o,s,a,l=nt.createElement("div"),u=nt.createElement("div");u.style&&(u.style.cssText="float:left;opacity:.5",ht.opacity="0.5"===u.style.opacity,ht.cssFloat=!!u.style.cssFloat,u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",ht.clearCloneStyle="content-box"===u.style.backgroundClip,l=nt.createElement("div"),l.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",u.innerHTML="",l.appendChild(u),ht.boxSizing=""===u.style.boxSizing||""===u.style.MozBoxSizing||""===u.style.WebkitBoxSizing,pt.extend(ht,{reliableHiddenOffsets:function(){return null==i&&e(),o},boxSizingReliable:function(){return null==i&&e(),r},pixelMarginRight:function(){return null==i&&e(),n},pixelPosition:function(){return null==i&&e(),i},reliableMarginRight:function(){return null==i&&e(),s},reliableMarginLeft:function(){return null==i&&e(),a}}))}();var fe,me,ge=/^(top|right|bottom|left)$/;t.getComputedStyle?(fe=function(e){var i=e.ownerDocument.defaultView;return i&&i.opener||(i=t),i.getComputedStyle(e)},me=function(t,e,i){var n,r,o,s,a=t.style;return i=i||fe(t),s=i?i.getPropertyValue(e)||i[e]:void 0,""!==s&&void 0!==s||pt.contains(t.ownerDocument,t)||(s=pt.style(t,e)),i&&!ht.pixelMarginRight()&&he.test(s)&&ce.test(e)&&(n=a.width,r=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=i.width,a.width=n,a.minWidth=r,a.maxWidth=o),void 0===s?s:s+""}):pe.currentStyle&&(fe=function(t){return t.currentStyle},me=function(t,e,i){var n,r,o,s,a=t.style;return i=i||fe(t),s=i?i[e]:void 0,null==s&&a&&a[e]&&(s=a[e]),he.test(s)&&!ge.test(e)&&(n=a.left,r=t.runtimeStyle,o=r&&r.left,o&&(r.left=t.currentStyle.left),a.left="fontSize"===e?"1em":s,s=a.pixelLeft+"px",a.left=n,o&&(r.left=o)),void 0===s?s:s+""||"auto"});var ve=/alpha\([^)]*\)/i,ye=/opacity\s*=\s*([^)]*)/i,be=/^(none|table(?!-c[ea]).+)/,_e=new RegExp("^("+jt+")(.*)$","i"),we={position:"absolute",visibility:"hidden",display:"block"},xe={letterSpacing:"0",fontWeight:"400"},ke=["Webkit","O","Moz","ms"],Ce=nt.createElement("div").style;pt.extend({cssHooks:{opacity:{get:function(t,e){if(e){var i=me(t,"opacity");return""===i?"1":i}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":ht.cssFloat?"cssFloat":"styleFloat"},style:function(t,e,i,n){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var r,o,s,a=pt.camelCase(e),l=t.style;if(e=pt.cssProps[a]||(pt.cssProps[a]=I(a)||a),s=pt.cssHooks[e]||pt.cssHooks[a],void 0===i)return s&&"get"in s&&void 0!==(r=s.get(t,!1,n))?r:l[e];if(o=typeof i,"string"===o&&(r=Nt.exec(i))&&r[1]&&(i=d(t,e,r),o="number"),null!=i&&i===i&&("number"===o&&(i+=r&&r[3]||(pt.cssNumber[a]?"":"px")),ht.clearCloneStyle||""!==i||0!==e.indexOf("background")||(l[e]="inherit"),!(s&&"set"in s&&void 0===(i=s.set(t,i,n)))))try{l[e]=i}catch(t){}}},css:function(t,e,i,n){var r,o,s,a=pt.camelCase(e);return e=pt.cssProps[a]||(pt.cssProps[a]=I(a)||a),s=pt.cssHooks[e]||pt.cssHooks[a],s&&"get"in s&&(o=s.get(t,!0,i)),void 0===o&&(o=me(t,e,n)),"normal"===o&&e in xe&&(o=xe[e]),""===i||i?(r=parseFloat(o),i===!0||isFinite(r)?r||0:o):o}}),pt.each(["height","width"],function(t,e){pt.cssHooks[e]={get:function(t,i,n){if(i)return be.test(pt.css(t,"display"))&&0===t.offsetWidth?de(t,we,function(){return N(t,e,n)}):N(t,e,n)},set:function(t,i,n){var r=n&&fe(t);return O(t,i,n?j(t,e,n,ht.boxSizing&&"border-box"===pt.css(t,"boxSizing",!1,r),r):0)}}}),ht.opacity||(pt.cssHooks.opacity={get:function(t,e){return ye.test((e&&t.currentStyle?t.currentStyle.filter:t.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":e?"1":""},set:function(t,e){var i=t.style,n=t.currentStyle,r=pt.isNumeric(e)?"alpha(opacity="+100*e+")":"",o=n&&n.filter||i.filter||"";i.zoom=1,(e>=1||""===e)&&""===pt.trim(o.replace(ve,""))&&i.removeAttribute&&(i.removeAttribute("filter"),""===e||n&&!n.filter)||(i.filter=ve.test(o)?o.replace(ve,r):o+" "+r)}}),pt.cssHooks.marginRight=E(ht.reliableMarginRight,function(t,e){if(e)return de(t,{display:"inline-block"},me,[t,"marginRight"])}),pt.cssHooks.marginLeft=E(ht.reliableMarginLeft,function(t,e){if(e)return(parseFloat(me(t,"marginLeft"))||(pt.contains(t.ownerDocument,t)?t.getBoundingClientRect().left-de(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}):0))+"px"}),pt.each({margin:"",padding:"",border:"Width"},function(t,e){pt.cssHooks[t+e]={expand:function(i){for(var n=0,r={},o="string"==typeof i?i.split(" "):[i];n<4;n++)r[t+Yt[n]+e]=o[n]||o[n-2]||o[0];return r}},ce.test(t)||(pt.cssHooks[t+e].set=O)}),pt.fn.extend({css:function(t,e){return Ft(this,function(t,e,i){var n,r,o={},s=0;if(pt.isArray(e)){for(n=fe(t),r=e.length;s<r;s++)o[e[s]]=pt.css(t,e[s],!1,n);return o}return void 0!==i?pt.style(t,e,i):pt.css(t,e)},t,e,arguments.length>1)},show:function(){return P(this,!0)},hide:function(){return P(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){Ht(this)?pt(this).show():pt(this).hide()})}}),pt.Tween=Y,Y.prototype={constructor:Y,init:function(t,e,i,n,r,o){this.elem=t,this.prop=i,this.easing=r||pt.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=n,this.unit=o||(pt.cssNumber[i]?"":"px")},cur:function(){var t=Y.propHooks[this.prop];return t&&t.get?t.get(this):Y.propHooks._default.get(this)},run:function(t){var e,i=Y.propHooks[this.prop];return this.options.duration?this.pos=e=pt.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):Y.propHooks._default.set(this),this}},Y.prototype.init.prototype=Y.prototype,Y.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=pt.css(t.elem,t.prop,""),e&&"auto"!==e?e:0)},set:function(t){pt.fx.step[t.prop]?pt.fx.step[t.prop](t):1!==t.elem.nodeType||null==t.elem.style[pt.cssProps[t.prop]]&&!pt.cssHooks[t.prop]?t.elem[t.prop]=t.now:pt.style(t.elem,t.prop,t.now+t.unit)}}},Y.propHooks.scrollTop=Y.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},pt.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},pt.fx=Y.prototype.init,pt.fx.step={};var Me,Te,Se=/^(?:toggle|show|hide)$/,De=/queueHooks$/;pt.Animation=pt.extend(B,{tweeners:{"*":[function(t,e){var i=this.createTween(t,e);return d(i.elem,t,Nt.exec(e),i),i}]},tweener:function(t,e){pt.isFunction(t)?(e=t,t=["*"]):t=t.match(Lt);for(var i,n=0,r=t.length;n<r;n++)i=t[n],B.tweeners[i]=B.tweeners[i]||[],B.tweeners[i].unshift(e)},prefilters:[W],prefilter:function(t,e){e?B.prefilters.unshift(t):B.prefilters.push(t)}}),pt.speed=function(t,e,i){var n=t&&"object"==typeof t?pt.extend({},t):{complete:i||!i&&e||pt.isFunction(t)&&t,duration:t,easing:i&&e||e&&!pt.isFunction(e)&&e};return n.duration=pt.fx.off?0:"number"==typeof n.duration?n.duration:n.duration in pt.fx.speeds?pt.fx.speeds[n.duration]:pt.fx.speeds._default,null!=n.queue&&n.queue!==!0||(n.queue="fx"),n.old=n.complete,n.complete=function(){pt.isFunction(n.old)&&n.old.call(this),n.queue&&pt.dequeue(this,n.queue)},n},pt.fn.extend({fadeTo:function(t,e,i,n){return this.filter(Ht).css("opacity",0).show().end().animate({opacity:e},t,i,n)},animate:function(t,e,i,n){var r=pt.isEmptyObject(t),o=pt.speed(e,i,n),s=function(){var e=B(this,pt.extend({},t),o);(r||pt._data(this,"finish"))&&e.stop(!0)};return s.finish=s,r||o.queue===!1?this.each(s):this.queue(o.queue,s)},stop:function(t,e,i){var n=function(t){var e=t.stop;delete t.stop,e(i)};return"string"!=typeof t&&(i=e,e=t,t=void 0),e&&t!==!1&&this.queue(t||"fx",[]),this.each(function(){var e=!0,r=null!=t&&t+"queueHooks",o=pt.timers,s=pt._data(this);if(r)s[r]&&s[r].stop&&n(s[r]);else for(r in s)s[r]&&s[r].stop&&De.test(r)&&n(s[r]);for(r=o.length;r--;)o[r].elem!==this||null!=t&&o[r].queue!==t||(o[r].anim.stop(i),e=!1,o.splice(r,1));!e&&i||pt.dequeue(this,t)})},finish:function(t){return t!==!1&&(t=t||"fx"),this.each(function(){var e,i=pt._data(this),n=i[t+"queue"],r=i[t+"queueHooks"],o=pt.timers,s=n?n.length:0;for(i.finish=!0,pt.queue(this,t,[]),r&&r.stop&&r.stop.call(this,!0),e=o.length;e--;)o[e].elem===this&&o[e].queue===t&&(o[e].anim.stop(!0),o.splice(e,1));for(e=0;e<s;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete i.finish})}}),pt.each(["toggle","show","hide"],function(t,e){var i=pt.fn[e];pt.fn[e]=function(t,n,r){return null==t||"boolean"==typeof t?i.apply(this,arguments):this.animate(F(e,!0),t,n,r)}}),pt.each({slideDown:F("show"),slideUp:F("hide"),slideToggle:F("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,e){pt.fn[t]=function(t,i,n){return this.animate(e,t,i,n)}}),pt.timers=[],pt.fx.tick=function(){var t,e=pt.timers,i=0;for(Me=pt.now();i<e.length;i++)t=e[i],t()||e[i]!==t||e.splice(i--,1);e.length||pt.fx.stop(),Me=void 0},pt.fx.timer=function(t){pt.timers.push(t),t()?pt.fx.start():pt.timers.pop()},pt.fx.interval=13,pt.fx.start=function(){Te||(Te=t.setInterval(pt.fx.tick,pt.fx.interval))},pt.fx.stop=function(){t.clearInterval(Te),Te=null},pt.fx.speeds={slow:600,fast:200,_default:400},pt.fn.delay=function(e,i){return e=pt.fx?pt.fx.speeds[e]||e:e,i=i||"fx",this.queue(i,function(i,n){var r=t.setTimeout(i,e);n.stop=function(){t.clearTimeout(r)}})},function(){var t,e=nt.createElement("input"),i=nt.createElement("div"),n=nt.createElement("select"),r=n.appendChild(nt.createElement("option"));i=nt.createElement("div"),i.setAttribute("className","t"),i.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",t=i.getElementsByTagName("a")[0],e.setAttribute("type","checkbox"),i.appendChild(e),t=i.getElementsByTagName("a")[0],t.style.cssText="top:1px",ht.getSetAttribute="t"!==i.className,ht.style=/top/.test(t.getAttribute("style")),ht.hrefNormalized="/a"===t.getAttribute("href"),ht.checkOn=!!e.value,ht.optSelected=r.selected,ht.enctype=!!nt.createElement("form").enctype,n.disabled=!0,ht.optDisabled=!r.disabled,e=nt.createElement("input"),e.setAttribute("value",""),ht.input=""===e.getAttribute("value"),e.value="t",e.setAttribute("type","radio"),ht.radioValue="t"===e.value}();var Le=/\r/g,Ae=/[\x20\t\r\n\f]+/g;pt.fn.extend({val:function(t){var e,i,n,r=this[0];{if(arguments.length)return n=pt.isFunction(t),this.each(function(i){var r;1===this.nodeType&&(r=n?t.call(this,i,pt(this).val()):t,null==r?r="":"number"==typeof r?r+="":pt.isArray(r)&&(r=pt.map(r,function(t){return null==t?"":t+""})),e=pt.valHooks[this.type]||pt.valHooks[this.nodeName.toLowerCase()],e&&"set"in e&&void 0!==e.set(this,r,"value")||(this.value=r))});if(r)return e=pt.valHooks[r.type]||pt.valHooks[r.nodeName.toLowerCase()],e&&"get"in e&&void 0!==(i=e.get(r,"value"))?i:(i=r.value,"string"==typeof i?i.replace(Le,""):null==i?"":i)}}}),pt.extend({valHooks:{option:{get:function(t){var e=pt.find.attr(t,"value");return null!=e?e:pt.trim(pt.text(t)).replace(Ae," ")}},select:{get:function(t){for(var e,i,n=t.options,r=t.selectedIndex,o="select-one"===t.type||r<0,s=o?null:[],a=o?r+1:n.length,l=r<0?a:o?r:0;l<a;l++)if(i=n[l],(i.selected||l===r)&&(ht.optDisabled?!i.disabled:null===i.getAttribute("disabled"))&&(!i.parentNode.disabled||!pt.nodeName(i.parentNode,"optgroup"))){if(e=pt(i).val(),o)return e;s.push(e)}return s},set:function(t,e){for(var i,n,r=t.options,o=pt.makeArray(e),s=r.length;s--;)if(n=r[s],pt.inArray(pt.valHooks.option.get(n),o)>-1)try{n.selected=i=!0}catch(t){n.scrollHeight}else n.selected=!1;return i||(t.selectedIndex=-1),r}}}}),pt.each(["radio","checkbox"],function(){pt.valHooks[this]={set:function(t,e){if(pt.isArray(e))return t.checked=pt.inArray(pt(t).val(),e)>-1}},ht.checkOn||(pt.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var Ee,Ie,Pe=pt.expr.attrHandle,Oe=/^(?:checked|selected)$/i,je=ht.getSetAttribute,Ne=ht.input;pt.fn.extend({attr:function(t,e){return Ft(this,pt.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function(){pt.removeAttr(this,t)})}}),pt.extend({attr:function(t,e,i){var n,r,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof t.getAttribute?pt.prop(t,e,i):(1===o&&pt.isXMLDoc(t)||(e=e.toLowerCase(),r=pt.attrHooks[e]||(pt.expr.match.bool.test(e)?Ie:Ee)),void 0!==i?null===i?void pt.removeAttr(t,e):r&&"set"in r&&void 0!==(n=r.set(t,i,e))?n:(t.setAttribute(e,i+""),i):r&&"get"in r&&null!==(n=r.get(t,e))?n:(n=pt.find.attr(t,e),null==n?void 0:n))},attrHooks:{type:{set:function(t,e){if(!ht.radioValue&&"radio"===e&&pt.nodeName(t,"input")){var i=t.value;return t.setAttribute("type",e),i&&(t.value=i),e}}}},removeAttr:function(t,e){var i,n,r=0,o=e&&e.match(Lt);if(o&&1===t.nodeType)for(;i=o[r++];)n=pt.propFix[i]||i,pt.expr.match.bool.test(i)?Ne&&je||!Oe.test(i)?t[n]=!1:t[pt.camelCase("default-"+i)]=t[n]=!1:pt.attr(t,i,""),t.removeAttribute(je?i:n)}}),Ie={set:function(t,e,i){return e===!1?pt.removeAttr(t,i):Ne&&je||!Oe.test(i)?t.setAttribute(!je&&pt.propFix[i]||i,i):t[pt.camelCase("default-"+i)]=t[i]=!0,i}},pt.each(pt.expr.match.bool.source.match(/\w+/g),function(t,e){var i=Pe[e]||pt.find.attr;Ne&&je||!Oe.test(e)?Pe[e]=function(t,e,n){var r,o;return n||(o=Pe[e],Pe[e]=r,r=null!=i(t,e,n)?e.toLowerCase():null,Pe[e]=o),r}:Pe[e]=function(t,e,i){if(!i)return t[pt.camelCase("default-"+e)]?e.toLowerCase():null}}),Ne&&je||(pt.attrHooks.value={set:function(t,e,i){return pt.nodeName(t,"input")?void(t.defaultValue=e):Ee&&Ee.set(t,e,i)}}),je||(Ee={set:function(t,e,i){var n=t.getAttributeNode(i);if(n||t.setAttributeNode(n=t.ownerDocument.createAttribute(i)),n.value=e+="","value"===i||e===t.getAttribute(i))return e}},Pe.id=Pe.name=Pe.coords=function(t,e,i){var n;if(!i)return(n=t.getAttributeNode(e))&&""!==n.value?n.value:null},pt.valHooks.button={get:function(t,e){var i=t.getAttributeNode(e);if(i&&i.specified)return i.value},set:Ee.set},pt.attrHooks.contenteditable={set:function(t,e,i){Ee.set(t,""!==e&&e,i)}},pt.each(["width","height"],function(t,e){pt.attrHooks[e]={set:function(t,i){if(""===i)return t.setAttribute(e,"auto"),i}}})),ht.style||(pt.attrHooks.style={get:function(t){return t.style.cssText||void 0},set:function(t,e){return t.style.cssText=e+""}});var Ye=/^(?:input|select|textarea|button|object)$/i,He=/^(?:a|area)$/i;pt.fn.extend({prop:function(t,e){return Ft(this,pt.prop,t,e,arguments.length>1)},removeProp:function(t){return t=pt.propFix[t]||t,this.each(function(){try{this[t]=void 0,delete this[t]}catch(t){}})}}),pt.extend({prop:function(t,e,i){var n,r,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&pt.isXMLDoc(t)||(e=pt.propFix[e]||e,r=pt.propHooks[e]),void 0!==i?r&&"set"in r&&void 0!==(n=r.set(t,i,e))?n:t[e]=i:r&&"get"in r&&null!==(n=r.get(t,e))?n:t[e]},propHooks:{tabIndex:{get:function(t){var e=pt.find.attr(t,"tabindex");return e?parseInt(e,10):Ye.test(t.nodeName)||He.test(t.nodeName)&&t.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),ht.hrefNormalized||pt.each(["href","src"],function(t,e){pt.propHooks[e]={get:function(t){return t.getAttribute(e,4)}}}),ht.optSelected||(pt.propHooks.selected={get:function(t){var e=t.parentNode;return e&&(e.selectedIndex,
e.parentNode&&e.parentNode.selectedIndex),null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),pt.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){pt.propFix[this.toLowerCase()]=this}),ht.enctype||(pt.propFix.enctype="encoding");var Fe=/[\t\r\n\f]/g;pt.fn.extend({addClass:function(t){var e,i,n,r,o,s,a,l=0;if(pt.isFunction(t))return this.each(function(e){pt(this).addClass(t.call(this,e,$(this)))});if("string"==typeof t&&t)for(e=t.match(Lt)||[];i=this[l++];)if(r=$(i),n=1===i.nodeType&&(" "+r+" ").replace(Fe," ")){for(s=0;o=e[s++];)n.indexOf(" "+o+" ")<0&&(n+=o+" ");a=pt.trim(n),r!==a&&pt.attr(i,"class",a)}return this},removeClass:function(t){var e,i,n,r,o,s,a,l=0;if(pt.isFunction(t))return this.each(function(e){pt(this).removeClass(t.call(this,e,$(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof t&&t)for(e=t.match(Lt)||[];i=this[l++];)if(r=$(i),n=1===i.nodeType&&(" "+r+" ").replace(Fe," ")){for(s=0;o=e[s++];)for(;n.indexOf(" "+o+" ")>-1;)n=n.replace(" "+o+" "," ");a=pt.trim(n),r!==a&&pt.attr(i,"class",a)}return this},toggleClass:function(t,e){var i=typeof t;return"boolean"==typeof e&&"string"===i?e?this.addClass(t):this.removeClass(t):pt.isFunction(t)?this.each(function(i){pt(this).toggleClass(t.call(this,i,$(this),e),e)}):this.each(function(){var e,n,r,o;if("string"===i)for(n=0,r=pt(this),o=t.match(Lt)||[];e=o[n++];)r.hasClass(e)?r.removeClass(e):r.addClass(e);else void 0!==t&&"boolean"!==i||(e=$(this),e&&pt._data(this,"__className__",e),pt.attr(this,"class",e||t===!1?"":pt._data(this,"__className__")||""))})},hasClass:function(t){var e,i,n=0;for(e=" "+t+" ";i=this[n++];)if(1===i.nodeType&&(" "+$(i)+" ").replace(Fe," ").indexOf(e)>-1)return!0;return!1}}),pt.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(t,e){pt.fn[e]=function(t,i){return arguments.length>0?this.on(e,null,t,i):this.trigger(e)}}),pt.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}});var Re=t.location,We=pt.now(),ze=/\?/,Be=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;pt.parseJSON=function(e){if(t.JSON&&t.JSON.parse)return t.JSON.parse(e+"");var i,n=null,r=pt.trim(e+"");return r&&!pt.trim(r.replace(Be,function(t,e,r,o){return i&&e&&(n=0),0===n?t:(i=r||e,n+=!o-!r,"")}))?Function("return "+r)():pt.error("Invalid JSON: "+e)},pt.parseXML=function(e){var i,n;if(!e||"string"!=typeof e)return null;try{t.DOMParser?(n=new t.DOMParser,i=n.parseFromString(e,"text/xml")):(i=new t.ActiveXObject("Microsoft.XMLDOM"),i.async="false",i.loadXML(e))}catch(t){i=void 0}return i&&i.documentElement&&!i.getElementsByTagName("parsererror").length||pt.error("Invalid XML: "+e),i};var $e=/#.*$/,qe=/([?&])_=[^&]*/,Ue=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Ve=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ge=/^(?:GET|HEAD)$/,Xe=/^\/\//,Je=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ke={},Qe={},Ze="*/".concat("*"),ti=Re.href,ei=Je.exec(ti.toLowerCase())||[];pt.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ti,type:"GET",isLocal:Ve.test(ei[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ze,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":pt.parseJSON,"text xml":pt.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?V(V(t,pt.ajaxSettings),e):V(pt.ajaxSettings,t)},ajaxPrefilter:q(Ke),ajaxTransport:q(Qe),ajax:function(e,i){function n(e,i,n,r){var o,h,y,b,w,k=i;2!==_&&(_=2,l&&t.clearTimeout(l),c=void 0,a=r||"",x.readyState=e>0?4:0,o=e>=200&&e<300||304===e,n&&(b=G(d,x,n)),b=X(d,b,x,o),o?(d.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(pt.lastModified[s]=w),w=x.getResponseHeader("etag"),w&&(pt.etag[s]=w)),204===e||"HEAD"===d.type?k="nocontent":304===e?k="notmodified":(k=b.state,h=b.data,y=b.error,o=!y)):(y=k,!e&&k||(k="error",e<0&&(e=0))),x.status=e,x.statusText=(i||k)+"",o?m.resolveWith(p,[h,k,x]):m.rejectWith(p,[x,k,y]),x.statusCode(v),v=void 0,u&&f.trigger(o?"ajaxSuccess":"ajaxError",[x,d,o?h:y]),g.fireWith(p,[x,k]),u&&(f.trigger("ajaxComplete",[x,d]),--pt.active||pt.event.trigger("ajaxStop")))}"object"==typeof e&&(i=e,e=void 0),i=i||{};var r,o,s,a,l,u,c,h,d=pt.ajaxSetup({},i),p=d.context||d,f=d.context&&(p.nodeType||p.jquery)?pt(p):pt.event,m=pt.Deferred(),g=pt.Callbacks("once memory"),v=d.statusCode||{},y={},b={},_=0,w="canceled",x={readyState:0,getResponseHeader:function(t){var e;if(2===_){if(!h)for(h={};e=Ue.exec(a);)h[e[1].toLowerCase()]=e[2];e=h[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return 2===_?a:null},setRequestHeader:function(t,e){var i=t.toLowerCase();return _||(t=b[i]=b[i]||t,y[t]=e),this},overrideMimeType:function(t){return _||(d.mimeType=t),this},statusCode:function(t){var e;if(t)if(_<2)for(e in t)v[e]=[v[e],t[e]];else x.always(t[x.status]);return this},abort:function(t){var e=t||w;return c&&c.abort(e),n(0,e),this}};if(m.promise(x).complete=g.add,x.success=x.done,x.error=x.fail,d.url=((e||d.url||ti)+"").replace($e,"").replace(Xe,ei[1]+"//"),d.type=i.method||i.type||d.method||d.type,d.dataTypes=pt.trim(d.dataType||"*").toLowerCase().match(Lt)||[""],null==d.crossDomain&&(r=Je.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]===ei[1]&&r[2]===ei[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(ei[3]||("http:"===ei[1]?"80":"443")))),d.data&&d.processData&&"string"!=typeof d.data&&(d.data=pt.param(d.data,d.traditional)),U(Ke,d,i,x),2===_)return x;u=pt.event&&d.global,u&&0===pt.active++&&pt.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Ge.test(d.type),s=d.url,d.hasContent||(d.data&&(s=d.url+=(ze.test(s)?"&":"?")+d.data,delete d.data),d.cache===!1&&(d.url=qe.test(s)?s.replace(qe,"$1_="+We++):s+(ze.test(s)?"&":"?")+"_="+We++)),d.ifModified&&(pt.lastModified[s]&&x.setRequestHeader("If-Modified-Since",pt.lastModified[s]),pt.etag[s]&&x.setRequestHeader("If-None-Match",pt.etag[s])),(d.data&&d.hasContent&&d.contentType!==!1||i.contentType)&&x.setRequestHeader("Content-Type",d.contentType),x.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+Ze+"; q=0.01":""):d.accepts["*"]);for(o in d.headers)x.setRequestHeader(o,d.headers[o]);if(d.beforeSend&&(d.beforeSend.call(p,x,d)===!1||2===_))return x.abort();w="abort";for(o in{success:1,error:1,complete:1})x[o](d[o]);if(c=U(Qe,d,i,x)){if(x.readyState=1,u&&f.trigger("ajaxSend",[x,d]),2===_)return x;d.async&&d.timeout>0&&(l=t.setTimeout(function(){x.abort("timeout")},d.timeout));try{_=1,c.send(y,n)}catch(t){if(!(_<2))throw t;n(-1,t)}}else n(-1,"No Transport");return x},getJSON:function(t,e,i){return pt.get(t,e,i,"json")},getScript:function(t,e){return pt.get(t,void 0,e,"script")}}),pt.each(["get","post"],function(t,e){pt[e]=function(t,i,n,r){return pt.isFunction(i)&&(r=r||n,n=i,i=void 0),pt.ajax(pt.extend({url:t,type:e,dataType:r,data:i,success:n},pt.isPlainObject(t)&&t))}}),pt._evalUrl=function(t){return pt.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},pt.fn.extend({wrapAll:function(t){if(pt.isFunction(t))return this.each(function(e){pt(this).wrapAll(t.call(this,e))});if(this[0]){var e=pt(t,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstChild&&1===t.firstChild.nodeType;)t=t.firstChild;return t}).append(this)}return this},wrapInner:function(t){return pt.isFunction(t)?this.each(function(e){pt(this).wrapInner(t.call(this,e))}):this.each(function(){var e=pt(this),i=e.contents();i.length?i.wrapAll(t):e.append(t)})},wrap:function(t){var e=pt.isFunction(t);return this.each(function(i){pt(this).wrapAll(e?t.call(this,i):t)})},unwrap:function(){return this.parent().each(function(){pt.nodeName(this,"body")||pt(this).replaceWith(this.childNodes)}).end()}}),pt.expr.filters.hidden=function(t){return ht.reliableHiddenOffsets()?t.offsetWidth<=0&&t.offsetHeight<=0&&!t.getClientRects().length:K(t)},pt.expr.filters.visible=function(t){return!pt.expr.filters.hidden(t)};var ii=/%20/g,ni=/\[\]$/,ri=/\r?\n/g,oi=/^(?:submit|button|image|reset|file)$/i,si=/^(?:input|select|textarea|keygen)/i;pt.param=function(t,e){var i,n=[],r=function(t,e){e=pt.isFunction(e)?e():null==e?"":e,n[n.length]=encodeURIComponent(t)+"="+encodeURIComponent(e)};if(void 0===e&&(e=pt.ajaxSettings&&pt.ajaxSettings.traditional),pt.isArray(t)||t.jquery&&!pt.isPlainObject(t))pt.each(t,function(){r(this.name,this.value)});else for(i in t)Q(i,t[i],e,r);return n.join("&").replace(ii,"+")},pt.fn.extend({serialize:function(){return pt.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=pt.prop(this,"elements");return t?pt.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!pt(this).is(":disabled")&&si.test(this.nodeName)&&!oi.test(t)&&(this.checked||!Rt.test(t))}).map(function(t,e){var i=pt(this).val();return null==i?null:pt.isArray(i)?pt.map(i,function(t){return{name:e.name,value:t.replace(ri,"\r\n")}}):{name:e.name,value:i.replace(ri,"\r\n")}}).get()}}),pt.ajaxSettings.xhr=void 0!==t.ActiveXObject?function(){return this.isLocal?tt():nt.documentMode>8?Z():/^(get|post|head|put|delete|options)$/i.test(this.type)&&Z()||tt()}:Z;var ai=0,li={},ui=pt.ajaxSettings.xhr();t.attachEvent&&t.attachEvent("onunload",function(){for(var t in li)li[t](void 0,!0)}),ht.cors=!!ui&&"withCredentials"in ui,ui=ht.ajax=!!ui,ui&&pt.ajaxTransport(function(e){if(!e.crossDomain||ht.cors){var i;return{send:function(n,r){var o,s=e.xhr(),a=++ai;if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(o in e.xhrFields)s[o]=e.xhrFields[o];e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(o in n)void 0!==n[o]&&s.setRequestHeader(o,n[o]+"");s.send(e.hasContent&&e.data||null),i=function(t,n){var o,l,u;if(i&&(n||4===s.readyState))if(delete li[a],i=void 0,s.onreadystatechange=pt.noop,n)4!==s.readyState&&s.abort();else{u={},o=s.status,"string"==typeof s.responseText&&(u.text=s.responseText);try{l=s.statusText}catch(t){l=""}o||!e.isLocal||e.crossDomain?1223===o&&(o=204):o=u.text?200:404}u&&r(o,l,u,s.getAllResponseHeaders())},e.async?4===s.readyState?t.setTimeout(i):s.onreadystatechange=li[a]=i:i()},abort:function(){i&&i(void 0,!0)}}}}),pt.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return pt.globalEval(t),t}}}),pt.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET",t.global=!1)}),pt.ajaxTransport("script",function(t){if(t.crossDomain){var e,i=nt.head||pt("head")[0]||nt.documentElement;return{send:function(n,r){e=nt.createElement("script"),e.async=!0,t.scriptCharset&&(e.charset=t.scriptCharset),e.src=t.url,e.onload=e.onreadystatechange=function(t,i){(i||!e.readyState||/loaded|complete/.test(e.readyState))&&(e.onload=e.onreadystatechange=null,e.parentNode&&e.parentNode.removeChild(e),e=null,i||r(200,"success"))},i.insertBefore(e,i.firstChild)},abort:function(){e&&e.onload(void 0,!0)}}}});var ci=[],hi=/(=)\?(?=&|$)|\?\?/;pt.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=ci.pop()||pt.expando+"_"+We++;return this[t]=!0,t}}),pt.ajaxPrefilter("json jsonp",function(e,i,n){var r,o,s,a=e.jsonp!==!1&&(hi.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&hi.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=pt.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(hi,"$1"+r):e.jsonp!==!1&&(e.url+=(ze.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return s||pt.error(r+" was not called"),s[0]},e.dataTypes[0]="json",o=t[r],t[r]=function(){s=arguments},n.always(function(){void 0===o?pt(t).removeProp(r):t[r]=o,e[r]&&(e.jsonpCallback=i.jsonpCallback,ci.push(r)),s&&pt.isFunction(o)&&o(s[0]),s=o=void 0}),"script"}),pt.parseHTML=function(t,e,i){if(!t||"string"!=typeof t)return null;"boolean"==typeof e&&(i=e,e=!1),e=e||nt;var n=xt.exec(t),r=!i&&[];return n?[e.createElement(n[1])]:(n=v([t],e,r),r&&r.length&&pt(r).remove(),pt.merge([],n.childNodes))};var di=pt.fn.load;pt.fn.load=function(t,e,i){if("string"!=typeof t&&di)return di.apply(this,arguments);var n,r,o,s=this,a=t.indexOf(" ");return a>-1&&(n=pt.trim(t.slice(a,t.length)),t=t.slice(0,a)),pt.isFunction(e)?(i=e,e=void 0):e&&"object"==typeof e&&(r="POST"),s.length>0&&pt.ajax({url:t,type:r||"GET",dataType:"html",data:e}).done(function(t){o=arguments,s.html(n?pt("<div>").append(pt.parseHTML(t)).find(n):t)}).always(i&&function(t,e){s.each(function(){i.apply(this,o||[t.responseText,e,t])})}),this},pt.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){pt.fn[e]=function(t){return this.on(e,t)}}),pt.expr.filters.animated=function(t){return pt.grep(pt.timers,function(e){return t===e.elem}).length},pt.offset={setOffset:function(t,e,i){var n,r,o,s,a,l,u,c=pt.css(t,"position"),h=pt(t),d={};"static"===c&&(t.style.position="relative"),a=h.offset(),o=pt.css(t,"top"),l=pt.css(t,"left"),u=("absolute"===c||"fixed"===c)&&pt.inArray("auto",[o,l])>-1,u?(n=h.position(),s=n.top,r=n.left):(s=parseFloat(o)||0,r=parseFloat(l)||0),pt.isFunction(e)&&(e=e.call(t,i,pt.extend({},a))),null!=e.top&&(d.top=e.top-a.top+s),null!=e.left&&(d.left=e.left-a.left+r),"using"in e?e.using.call(t,d):h.css(d)}},pt.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){pt.offset.setOffset(this,t,e)});var e,i,n={top:0,left:0},r=this[0],o=r&&r.ownerDocument;if(o)return e=o.documentElement,pt.contains(e,r)?("undefined"!=typeof r.getBoundingClientRect&&(n=r.getBoundingClientRect()),i=et(o),{top:n.top+(i.pageYOffset||e.scrollTop)-(e.clientTop||0),left:n.left+(i.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}):n},position:function(){if(this[0]){var t,e,i={top:0,left:0},n=this[0];return"fixed"===pt.css(n,"position")?e=n.getBoundingClientRect():(t=this.offsetParent(),e=this.offset(),pt.nodeName(t[0],"html")||(i=t.offset()),i.top+=pt.css(t[0],"borderTopWidth",!0),i.left+=pt.css(t[0],"borderLeftWidth",!0)),{top:e.top-i.top-pt.css(n,"marginTop",!0),left:e.left-i.left-pt.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent;t&&!pt.nodeName(t,"html")&&"static"===pt.css(t,"position");)t=t.offsetParent;return t||pe})}}),pt.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){var i=/Y/.test(e);pt.fn[t]=function(n){return Ft(this,function(t,n,r){var o=et(t);return void 0===r?o?e in o?o[e]:o.document.documentElement[n]:t[n]:void(o?o.scrollTo(i?pt(o).scrollLeft():r,i?r:pt(o).scrollTop()):t[n]=r)},t,n,arguments.length,null)}}),pt.each(["top","left"],function(t,e){pt.cssHooks[e]=E(ht.pixelPosition,function(t,i){if(i)return i=me(t,e),he.test(i)?pt(t).position()[e]+"px":i})}),pt.each({Height:"height",Width:"width"},function(t,e){pt.each({padding:"inner"+t,content:e,"":"outer"+t},function(i,n){pt.fn[n]=function(n,r){var o=arguments.length&&(i||"boolean"!=typeof n),s=i||(n===!0||r===!0?"margin":"border");return Ft(this,function(e,i,n){var r;return pt.isWindow(e)?e.document.documentElement["client"+t]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+t],r["scroll"+t],e.body["offset"+t],r["offset"+t],r["client"+t])):void 0===n?pt.css(e,i,s):pt.style(e,i,n,s)},e,o?n:void 0,o,null)}})}),pt.fn.extend({bind:function(t,e,i){return this.on(t,null,e,i)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,i,n){return this.on(e,t,i,n)},undelegate:function(t,e,i){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",i)}}),pt.fn.size=function(){return this.length},pt.fn.andSelf=pt.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return pt});var pi=t.jQuery,fi=t.$;return pt.noConflict=function(e){return t.$===pt&&(t.$=fi),e&&t.jQuery===pt&&(t.jQuery=pi),pt},e||(t.jQuery=t.$=pt),pt}),function(t,e){"use strict";t.rails!==e&&t.error("jquery-ujs has already been loaded!");var i,n=t(document);t.rails=i={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]",buttonClickSelector:"button[data-remote]:not([form]):not(form button), button[data-confirm]:not([form]):not(form button)",inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]",formSubmitSelector:"form",formInputClickSelector:"form input[type=submit], form input[type=image], form button[type=submit], form button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])",disableSelector:"input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled",enableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled",requiredInputSelector:"input[name][required]:not([disabled]), textarea[name][required]:not([disabled])",fileInputSelector:"input[name][type=file]:not([disabled])",linkDisableSelector:"a[data-disable-with], a[data-disable]",buttonDisableSelector:"button[data-remote][data-disable-with], button[data-remote][data-disable]",csrfToken:function(){return t("meta[name=csrf-token]").attr("content")},csrfParam:function(){return t("meta[name=csrf-param]").attr("content")},CSRFProtection:function(t){var e=i.csrfToken();e&&t.setRequestHeader("X-CSRF-Token",e)},refreshCSRFTokens:function(){t('form input[name="'+i.csrfParam()+'"]').val(i.csrfToken())},fire:function(e,i,n){var r=t.Event(i);return e.trigger(r,n),r.result!==!1},confirm:function(t){return confirm(t)},ajax:function(e){return t.ajax(e)},href:function(t){return t[0].href},isRemote:function(t){return t.data("remote")!==e&&t.data("remote")!==!1},handleRemote:function(n){var r,o,s,a,l,u;if(i.fire(n,"ajax:before")){if(a=n.data("with-credentials")||null,l=n.data("type")||t.ajaxSettings&&t.ajaxSettings.dataType,n.is("form")){r=n.data("ujs:submit-button-formmethod")||n.attr("method"),o=n.data("ujs:submit-button-formaction")||n.attr("action"),s=t(n[0]).serializeArray();var c=n.data("ujs:submit-button");c&&(s.push(c),n.data("ujs:submit-button",null)),n.data("ujs:submit-button-formmethod",null),n.data("ujs:submit-button-formaction",null)}else n.is(i.inputChangeSelector)?(r=n.data("method"),o=n.data("url"),s=n.serialize(),n.data("params")&&(s=s+"&"+n.data("params"))):n.is(i.buttonClickSelector)?(r=n.data("method")||"get",o=n.data("url"),s=n.serialize(),n.data("params")&&(s=s+"&"+n.data("params"))):(r=n.data("method"),o=i.href(n),s=n.data("params")||null);return u={type:r||"GET",data:s,dataType:l,beforeSend:function(t,r){return r.dataType===e&&t.setRequestHeader("accept","*/*;q=0.5, "+r.accepts.script),!!i.fire(n,"ajax:beforeSend",[t,r])&&void n.trigger("ajax:send",t)},success:function(t,e,i){n.trigger("ajax:success",[t,e,i])},complete:function(t,e){n.trigger("ajax:complete",[t,e])},error:function(t,e,i){n.trigger("ajax:error",[t,e,i])},crossDomain:i.isCrossDomain(o)},a&&(u.xhrFields={withCredentials:a}),o&&(u.url=o),i.ajax(u)}return!1},isCrossDomain:function(t){var e=document.createElement("a");e.href=location.href;var i=document.createElement("a");try{return i.href=t,i.href=i.href,!((!i.protocol||":"===i.protocol)&&!i.host||e.protocol+"//"+e.host==i.protocol+"//"+i.host)}catch(t){return!0}},handleMethod:function(n){var r=i.href(n),o=n.data("method"),s=n.attr("target"),a=i.csrfToken(),l=i.csrfParam(),u=t('<form method="post" action="'+r+'"></form>'),c='<input name="_method" value="'+o+'" type="hidden" />';l===e||a===e||i.isCrossDomain(r)||(c+='<input name="'+l+'" value="'+a+'" type="hidden" />'),s&&u.attr("target",s),u.hide().append(c).appendTo("body"),u.submit()},formElements:function(e,i){return e.is("form")?t(e[0].elements).filter(i):e.find(i)},disableFormElements:function(e){i.formElements(e,i.disableSelector).each(function(){i.disableFormElement(t(this))})},disableFormElement:function(t){var i,n;i=t.is("button")?"html":"val",n=t.data("disable-with"),n!==e&&(t.data("ujs:enable-with",t[i]()),t[i](n)),t.prop("disabled",!0),t.data("ujs:disabled",!0)},enableFormElements:function(e){i.formElements(e,i.enableSelector).each(function(){i.enableFormElement(t(this))})},enableFormElement:function(t){var i=t.is("button")?"html":"val";t.data("ujs:enable-with")!==e&&(t[i](t.data("ujs:enable-with")),t.removeData("ujs:enable-with")),t.prop("disabled",!1),t.removeData("ujs:disabled")},allowAction:function(t){var e,n=t.data("confirm"),r=!1;if(!n)return!0;if(i.fire(t,"confirm")){try{r=i.confirm(n)}catch(t){(console.error||console.log).call(console,t.stack||t)}e=i.fire(t,"confirm:complete",[r])}return r&&e},blankInputs:function(e,i,n){var r,o,s,a,l=t(),u=i||"input,textarea",c=e.find(u),h={};return c.each(function(){r=t(this),r.is("input[type=radio]")?(a=r.attr("name"),h[a]||(0===e.find('input[type=radio]:checked[name="'+a+'"]').length&&(s=e.find('input[type=radio][name="'+a+'"]'),l=l.add(s)),h[a]=a)):(o=r.is("input[type=checkbox],input[type=radio]")?r.is(":checked"):!!r.val(),o===n&&(l=l.add(r)))}),!!l.length&&l},nonBlankInputs:function(t,e){return i.blankInputs(t,e,!0)},stopEverything:function(e){return t(e.target).trigger("ujs:everythingStopped"),e.stopImmediatePropagation(),!1},disableElement:function(t){var n=t.data("disable-with");n!==e&&(t.data("ujs:enable-with",t.html()),t.html(n)),t.bind("click.railsDisable",function(t){return i.stopEverything(t)}),t.data("ujs:disabled",!0)},enableElement:function(t){t.data("ujs:enable-with")!==e&&(t.html(t.data("ujs:enable-with")),t.removeData("ujs:enable-with")),t.unbind("click.railsDisable"),t.removeData("ujs:disabled")}},i.fire(n,"rails:attachBindings")&&(t.ajaxPrefilter(function(t,e,n){t.crossDomain||i.CSRFProtection(n)}),t(window).on("pageshow.rails",function(){t(t.rails.enableSelector).each(function(){var e=t(this);e.data("ujs:disabled")&&t.rails.enableFormElement(e)}),t(t.rails.linkDisableSelector).each(function(){var e=t(this);e.data("ujs:disabled")&&t.rails.enableElement(e)})}),n.on("ajax:complete",i.linkDisableSelector,function(){i.enableElement(t(this))}),n.on("ajax:complete",i.buttonDisableSelector,function(){i.enableFormElement(t(this))}),n.on("click.rails",i.linkClickSelector,function(e){var n=t(this),r=n.data("method"),o=n.data("params"),s=e.metaKey||e.ctrlKey;if(!i.allowAction(n))return i.stopEverything(e);if(!s&&n.is(i.linkDisableSelector)&&i.disableElement(n),i.isRemote(n)){if(s&&(!r||"GET"===r)&&!o)return!0;var a=i.handleRemote(n);return a===!1?i.enableElement(n):a.fail(function(){i.enableElement(n)}),!1}return r?(i.handleMethod(n),!1):void 0}),n.on("click.rails",i.buttonClickSelector,function(e){var n=t(this);if(!i.allowAction(n)||!i.isRemote(n))return i.stopEverything(e);n.is(i.buttonDisableSelector)&&i.disableFormElement(n);var r=i.handleRemote(n);return r===!1?i.enableFormElement(n):r.fail(function(){i.enableFormElement(n)}),!1}),n.on("change.rails",i.inputChangeSelector,function(e){var n=t(this);return i.allowAction(n)&&i.isRemote(n)?(i.handleRemote(n),!1):i.stopEverything(e)}),n.on("submit.rails",i.formSubmitSelector,function(n){var r,o,s=t(this),a=i.isRemote(s);if(!i.allowAction(s))return i.stopEverything(n);if(s.attr("novalidate")===e)if(s.data("ujs:formnovalidate-button")===e){if(r=i.blankInputs(s,i.requiredInputSelector,!1),r&&i.fire(s,"ajax:aborted:required",[r]))return i.stopEverything(n)}else s.data("ujs:formnovalidate-button",e);if(a){if(o=i.nonBlankInputs(s,i.fileInputSelector)){setTimeout(function(){i.disableFormElements(s)},13);var l=i.fire(s,"ajax:aborted:file",[o]);return l||setTimeout(function(){i.enableFormElements(s)},13),l}return i.handleRemote(s),!1}setTimeout(function(){i.disableFormElements(s)},13)}),n.on("click.rails",i.formInputClickSelector,function(e){var n=t(this);if(!i.allowAction(n))return i.stopEverything(e);var r=n.attr("name"),o=r?{name:r,value:n.val()}:null,s=n.closest("form");0===s.length&&(s=t("#"+n.attr("form"))),s.data("ujs:submit-button",o),s.data("ujs:formnovalidate-button",n.attr("formnovalidate")),s.data("ujs:submit-button-formaction",n.attr("formaction")),s.data("ujs:submit-button-formmethod",n.attr("formmethod"))}),n.on("ajax:send.rails",i.formSubmitSelector,function(e){this===e.target&&i.disableFormElements(t(this))}),n.on("ajax:complete.rails",i.formSubmitSelector,function(e){this===e.target&&i.enableFormElements(t(this))}),t(function(){i.refreshCSRFTokens()}))}(jQuery),!function(t,e){"function"==typeof define&&define.amd?define("eve",function(){return e()}):"object"==typeof exports?module.exports=e():t.eve=e()}(this,function(){var t,e,i="0.4.2",n="hasOwnProperty",r=/[\.\/]/,o="*",s=function(){},a=function(t,e){return t-e},l={n:{}},u=function(i,n){i=String(i);var r,o=e,s=Array.prototype.slice.call(arguments,2),l=u.listeners(i),c=0,h=[],d={},p=[],f=t;t=i,e=0;for(var m=0,g=l.length;g>m;m++)"zIndex"in l[m]&&(h.push(l[m].zIndex),l[m].zIndex<0&&(d[l[m].zIndex]=l[m]));for(h.sort(a);h[c]<0;)if(r=d[h[c++]],p.push(r.apply(n,s)),e)return e=o,p;for(m=0;g>m;m++)if(r=l[m],"zIndex"in r)if(r.zIndex==h[c]){if(p.push(r.apply(n,s)),e)break;do if(c++,r=d[h[c]],r&&p.push(r.apply(n,s)),e)break;while(r)}else d[r.zIndex]=r;else if(p.push(r.apply(n,s)),e)break;return e=o,t=f,p.length?p:null};return u._events=l,u.listeners=function(t){var e,i,n,s,a,u,c,h,d=t.split(r),p=l,f=[p],m=[];for(s=0,a=d.length;a>s;s++){for(h=[],u=0,c=f.length;c>u;u++)for(p=f[u].n,i=[p[d[s]],p[o]],n=2;n--;)e=i[n],e&&(h.push(e),m=m.concat(e.f||[]));f=h}return m},u.on=function(t,e){if(t=String(t),"function"!=typeof e)return function(){};for(var i=t.split(r),n=l,o=0,a=i.length;a>o;o++)n=n.n,n=n.hasOwnProperty(i[o])&&n[i[o]]||(n[i[o]]={n:{}});for(n.f=n.f||[],o=0,a=n.f.length;a>o;o++)if(n.f[o]==e)return s;return n.f.push(e),function(t){+t==+t&&(e.zIndex=+t)}},u.f=function(t){var e=[].slice.call(arguments,1);return function(){u.apply(null,[t,null].concat(e).concat([].slice.call(arguments,0)))}},u.stop=function(){e=1},u.nt=function(e){return e?new RegExp("(?:\\.|\\/|^)"+e+"(?:\\.|\\/|$)").test(t):t},u.nts=function(){return t.split(r)},u.off=u.unbind=function(t,e){if(!t)return void(u._events=l={n:{}});var i,s,a,c,h,d,p,f=t.split(r),m=[l];for(c=0,h=f.length;h>c;c++)for(d=0;d<m.length;d+=a.length-2){if(a=[d,1],i=m[d].n,f[c]!=o)i[f[c]]&&a.push(i[f[c]]);else for(s in i)i[n](s)&&a.push(i[s]);m.splice.apply(m,a)}for(c=0,h=m.length;h>c;c++)for(i=m[c];i.n;){if(e){if(i.f){for(d=0,p=i.f.length;p>d;d++)if(i.f[d]==e){i.f.splice(d,1);break}!i.f.length&&delete i.f}for(s in i.n)if(i.n[n](s)&&i.n[s].f){var g=i.n[s].f;for(d=0,p=g.length;p>d;d++)if(g[d]==e){g.splice(d,1);break}!g.length&&delete i.n[s].f}}else{delete i.f;for(s in i.n)i.n[n](s)&&i.n[s].f&&delete i.n[s].f}i=i.n}},u.once=function(t,e){var i=function(){return u.unbind(t,i),e.apply(this,arguments)};return u.on(t,i)},u.version=i,u.toString=function(){return"You are running Eve "+i},u}),function(t,e){"function"==typeof define&&define.amd?define("raphael.core",["eve"],function(t){return e(t)}):"object"==typeof exports?module.exports=e(require("eve")):t.Raphael=e(t.eve)}(this,function(t){function e(i){if(e.is(i,"function"))return b?i():t.on("raphael.DOMload",i);if(e.is(i,U))return e._engine.create[D](e,i.splice(0,3+e.is(i[0],$))).add(i);var n=Array.prototype.slice.call(arguments,0);if(e.is(n[n.length-1],"function")){var r=n.pop();return b?r.call(e._engine.create[D](e,n)):t.on("raphael.DOMload",function(){r.call(e._engine.create[D](e,n))})}return e._engine.create[D](e,arguments)}function i(t){if("function"==typeof t||Object(t)!==t)return t;var e=new t.constructor;for(var n in t)t[C](n)&&(e[n]=i(t[n]));return e}function n(t,e){for(var i=0,n=t.length;n>i;i++)if(t[i]===e)return t.push(t.splice(i,1)[0])}function r(t,e,i){function r(){var o=Array.prototype.slice.call(arguments,0),s=o.join("\u2400"),a=r.cache=r.cache||{},l=r.count=r.count||[];return a[C](s)?(n(l,s),i?i(a[s]):a[s]):(l.length>=1e3&&delete a[l.shift()],l.push(s),a[s]=t[D](e,o),i?i(a[s]):a[s])}return r}function o(){return this.hex}function s(t,e){for(var i=[],n=0,r=t.length;r-2*!e>n;n+=2){var o=[{x:+t[n-2],y:+t[n-1]},{x:+t[n],y:+t[n+1]},{x:+t[n+2],y:+t[n+3]},{x:+t[n+4],y:+t[n+5]}];e?n?r-4==n?o[3]={x:+t[0],y:+t[1]}:r-2==n&&(o[2]={x:+t[0],y:+t[1]},o[3]={x:+t[2],y:+t[3]}):o[0]={x:+t[r-2],y:+t[r-1]}:r-4==n?o[3]=o[2]:n||(o[0]={x:+t[n],y:+t[n+1]}),i.push(["C",(-o[0].x+6*o[1].x+o[2].x)/6,(-o[0].y+6*o[1].y+o[2].y)/6,(o[1].x+6*o[2].x-o[3].x)/6,(o[1].y+6*o[2].y-o[3].y)/6,o[2].x,o[2].y])}return i}function a(t,e,i,n,r){var o=-3*e+9*i-9*n+3*r,s=t*o+6*e-12*i+6*n;return t*s-3*e+3*i}function l(t,e,i,n,r,o,s,l,u){null==u&&(u=1),u=u>1?1:0>u?0:u;for(var c=u/2,h=12,d=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],p=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],f=0,m=0;h>m;m++){var g=c*d[m]+c,v=a(g,t,i,r,s),y=a(g,e,n,o,l),b=v*v+y*y;f+=p[m]*H.sqrt(b)}return c*f}function u(t,e,i,n,r,o,s,a,u){if(!(0>u||l(t,e,i,n,r,o,s,a)<u)){var c,h=1,d=h/2,p=h-d,f=.01;for(c=l(t,e,i,n,r,o,s,a,p);W(c-u)>f;)d/=2,p+=(u>c?1:-1)*d,c=l(t,e,i,n,r,o,s,a,p);return p}}function c(t,e,i,n,r,o,s,a){if(!(F(t,i)<R(r,s)||R(t,i)>F(r,s)||F(e,n)<R(o,a)||R(e,n)>F(o,a))){var l=(t*n-e*i)*(r-s)-(t-i)*(r*a-o*s),u=(t*n-e*i)*(o-a)-(e-n)*(r*a-o*s),c=(t-i)*(o-a)-(e-n)*(r-s);if(c){var h=l/c,d=u/c,p=+h.toFixed(2),f=+d.toFixed(2);if(!(p<+R(t,i).toFixed(2)||p>+F(t,i).toFixed(2)||p<+R(r,s).toFixed(2)||p>+F(r,s).toFixed(2)||f<+R(e,n).toFixed(2)||f>+F(e,n).toFixed(2)||f<+R(o,a).toFixed(2)||f>+F(o,a).toFixed(2)))return{x:h,y:d}}}}function h(t,i,n){var r=e.bezierBBox(t),o=e.bezierBBox(i);if(!e.isBBoxIntersect(r,o))return n?0:[];for(var s=l.apply(0,t),a=l.apply(0,i),u=F(~~(s/5),1),h=F(~~(a/5),1),d=[],p=[],f={},m=n?0:[],g=0;u+1>g;g++){var v=e.findDotsAtSegment.apply(e,t.concat(g/u));d.push({x:v.x,y:v.y,t:g/u})}for(g=0;h+1>g;g++)v=e.findDotsAtSegment.apply(e,i.concat(g/h)),p.push({x:v.x,y:v.y,t:g/h});for(g=0;u>g;g++)for(var y=0;h>y;y++){var b=d[g],_=d[g+1],w=p[y],x=p[y+1],k=W(_.x-b.x)<.001?"y":"x",C=W(x.x-w.x)<.001?"y":"x",M=c(b.x,b.y,_.x,_.y,w.x,w.y,x.x,x.y);if(M){if(f[M.x.toFixed(4)]==M.y.toFixed(4))continue;f[M.x.toFixed(4)]=M.y.toFixed(4);var T=b.t+W((M[k]-b[k])/(_[k]-b[k]))*(_.t-b.t),S=w.t+W((M[C]-w[C])/(x[C]-w[C]))*(x.t-w.t);T>=0&&1.001>=T&&S>=0&&1.001>=S&&(n?m++:m.push({x:M.x,y:M.y,t1:R(T,1),t2:R(S,1)}))}}return m}function d(t,i,n){t=e._path2curve(t),i=e._path2curve(i);for(var r,o,s,a,l,u,c,d,p,f,m=n?0:[],g=0,v=t.length;v>g;g++){var y=t[g];if("M"==y[0])r=l=y[1],o=u=y[2];else{"C"==y[0]?(p=[r,o].concat(y.slice(1)),r=p[6],o=p[7]):(p=[r,o,r,o,l,u,l,u],r=l,o=u);for(var b=0,_=i.length;_>b;b++){var w=i[b];if("M"==w[0])s=c=w[1],a=d=w[2];else{"C"==w[0]?(f=[s,a].concat(w.slice(1)),s=f[6],a=f[7]):(f=[s,a,s,a,c,d,c,d],s=c,a=d);var x=h(p,f,n);if(n)m+=x;else{for(var k=0,C=x.length;C>k;k++)x[k].segment1=g,x[k].segment2=b,x[k].bez1=p,x[k].bez2=f;m=m.concat(x)}}}}}return m}function p(t,e,i,n,r,o){null!=t?(this.a=+t,this.b=+e,this.c=+i,this.d=+n,this.e=+r,this.f=+o):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0)}function f(){return this.x+I+this.y+I+this.width+" \xd7 "+this.height}function m(t,e,i,n,r,o){function s(t){return((h*t+c)*t+u)*t}function a(t,e){var i=l(t,e);return((f*i+p)*i+d)*i}function l(t,e){var i,n,r,o,a,l;for(r=t,l=0;8>l;l++){if(o=s(r)-t,W(o)<e)return r;if(a=(3*h*r+2*c)*r+u,W(a)<1e-6)break;r-=o/a}if(i=0,n=1,r=t,i>r)return i;if(r>n)return n;for(;n>i;){if(o=s(r),W(o-t)<e)return r;t>o?i=r:n=r,r=(n-i)/2+i}return r}var u=3*e,c=3*(n-e)-u,h=1-u-c,d=3*i,p=3*(r-i)-d,f=1-d-p;return a(t,1/(200*o))}function g(t,e){var i=[],n={};if(this.ms=e,this.times=1,t){for(var r in t)t[C](r)&&(n[Q(r)]=t[r],i.push(Q(r)));i.sort(ct)}this.anim=n,this.top=i[i.length-1],this.percents=i}function v(i,n,r,o,s,a){r=Q(r);var l,u,c,h,d,f,g=i.ms,v={},y={},b={};if(o)for(x=0,k=oe.length;k>x;x++){var _=oe[x];if(_.el.id==n.id&&_.anim==i){
_.percent!=r?(oe.splice(x,1),c=1):u=_,n.attr(_.totalOrigin);break}}else o=+y;for(var x=0,k=i.percents.length;k>x;x++){if(i.percents[x]==r||i.percents[x]>o*i.top){r=i.percents[x],d=i.percents[x-1]||0,g=g/i.top*(r-d),h=i.percents[x+1],l=i.anim[r];break}o&&n.attr(i.anim[i.percents[x]])}if(l){if(u)u.initstatus=o,u.start=new Date-u.ms*o;else{for(var M in l)if(l[C](M)&&(it[C](M)||n.paper.customAttributes[C](M)))switch(v[M]=n.attr(M),null==v[M]&&(v[M]=et[M]),y[M]=l[M],it[M]){case $:b[M]=(y[M]-v[M])/g;break;case"colour":v[M]=e.getRGB(v[M]);var T=e.getRGB(y[M]);b[M]={r:(T.r-v[M].r)/g,g:(T.g-v[M].g)/g,b:(T.b-v[M].b)/g};break;case"path":var S=Ot(v[M],y[M]),D=S[1];for(v[M]=S[0],b[M]=[],x=0,k=v[M].length;k>x;x++){b[M][x]=[0];for(var A=1,E=v[M][x].length;E>A;A++)b[M][x][A]=(D[x][A]-v[M][x][A])/g}break;case"transform":var I=n._,j=Ft(I[M],y[M]);if(j)for(v[M]=j.from,y[M]=j.to,b[M]=[],b[M].real=!0,x=0,k=v[M].length;k>x;x++)for(b[M][x]=[v[M][x][0]],A=1,E=v[M][x].length;E>A;A++)b[M][x][A]=(y[M][x][A]-v[M][x][A])/g;else{var N=n.matrix||new p,Y={_:{transform:I.transform},getBBox:function(){return n.getBBox(1)}};v[M]=[N.a,N.b,N.c,N.d,N.e,N.f],Yt(Y,y[M]),y[M]=Y._.transform,b[M]=[(Y.matrix.a-N.a)/g,(Y.matrix.b-N.b)/g,(Y.matrix.c-N.c)/g,(Y.matrix.d-N.d)/g,(Y.matrix.e-N.e)/g,(Y.matrix.f-N.f)/g]}break;case"csv":var H=P(l[M])[O](w),F=P(v[M])[O](w);if("clip-rect"==M)for(v[M]=F,b[M]=[],x=F.length;x--;)b[M][x]=(H[x]-v[M][x])/g;y[M]=H;break;default:for(H=[][L](l[M]),F=[][L](v[M]),b[M]=[],x=n.paper.customAttributes[M].length;x--;)b[M][x]=((H[x]||0)-(F[x]||0))/g}var R=l.easing,W=e.easing_formulas[R];if(!W)if(W=P(R).match(J),W&&5==W.length){var z=W;W=function(t){return m(t,+z[1],+z[2],+z[3],+z[4],g)}}else W=ht;if(f=l.start||i.start||+new Date,_={anim:i,percent:r,timestamp:f,start:f+(i.del||0),status:0,initstatus:o||0,stop:!1,ms:g,easing:W,from:v,diff:b,to:y,el:n,callback:l.callback,prev:d,next:h,repeat:a||i.times,origin:n.attr(),totalOrigin:s},oe.push(_),o&&!u&&!c&&(_.stop=!0,_.start=new Date-g*o,1==oe.length))return ae();c&&(_.start=new Date-_.ms*o),1==oe.length&&se(ae)}t("raphael.anim.start."+n.id,n,i)}}function y(t){for(var e=0;e<oe.length;e++)oe[e].el.paper==t&&oe.splice(e--,1)}e.version="2.1.4",e.eve=t;var b,_,w=/[, ]+/,x={circle:1,rect:1,path:1,ellipse:1,text:1,image:1},k=/\{(\d+)\}/g,C="hasOwnProperty",M={doc:document,win:window},T={was:Object.prototype[C].call(M.win,"Raphael"),is:M.win.Raphael},S=function(){this.ca=this.customAttributes={}},D="apply",L="concat",A="ontouchstart"in M.win||M.win.DocumentTouch&&M.doc instanceof DocumentTouch,E="",I=" ",P=String,O="split",j="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[O](I),N={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},Y=P.prototype.toLowerCase,H=Math,F=H.max,R=H.min,W=H.abs,z=H.pow,B=H.PI,$="number",q="string",U="array",V=Object.prototype.toString,G=(e._ISURL=/^url\(['"]?(.+?)['"]?\)$/i,/^\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),X={NaN:1,Infinity:1,"-Infinity":1},J=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,K=H.round,Q=parseFloat,Z=parseInt,tt=P.prototype.toUpperCase,et=e._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},it=e._availableAnimAttrs={blur:$,"clip-rect":"csv",cx:$,cy:$,fill:"colour","fill-opacity":$,"font-size":$,height:$,opacity:$,path:"path",r:$,rx:$,ry:$,stroke:"colour","stroke-opacity":$,"stroke-width":$,transform:"transform",width:$,x:$,y:$},nt=/[\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]*/,rt={hs:1,rg:1},ot=/,?([achlmqrstvxz]),?/gi,st=/([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]*)+)/gi,at=/([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]*)+)/gi,lt=/(-?\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]*/gi,ut=(e._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]*([^\)]+?)\))?/,{}),ct=function(t,e){return Q(t)-Q(e)},ht=function(t){return t},dt=e._rectPath=function(t,e,i,n,r){return r?[["M",t+r,e],["l",i-2*r,0],["a",r,r,0,0,1,r,r],["l",0,n-2*r],["a",r,r,0,0,1,-r,r],["l",2*r-i,0],["a",r,r,0,0,1,-r,-r],["l",0,2*r-n],["a",r,r,0,0,1,r,-r],["z"]]:[["M",t,e],["l",i,0],["l",0,n],["l",-i,0],["z"]]},pt=function(t,e,i,n){return null==n&&(n=i),[["M",t,e],["m",0,-n],["a",i,n,0,1,1,0,2*n],["a",i,n,0,1,1,0,-2*n],["z"]]},ft=e._getPath={path:function(t){return t.attr("path")},circle:function(t){var e=t.attrs;return pt(e.cx,e.cy,e.r)},ellipse:function(t){var e=t.attrs;return pt(e.cx,e.cy,e.rx,e.ry)},rect:function(t){var e=t.attrs;return dt(e.x,e.y,e.width,e.height,e.r)},image:function(t){var e=t.attrs;return dt(e.x,e.y,e.width,e.height)},text:function(t){var e=t._getBBox();return dt(e.x,e.y,e.width,e.height)},set:function(t){var e=t._getBBox();return dt(e.x,e.y,e.width,e.height)}},mt=e.mapPath=function(t,e){if(!e)return t;var i,n,r,o,s,a,l;for(t=Ot(t),r=0,s=t.length;s>r;r++)for(l=t[r],o=1,a=l.length;a>o;o+=2)i=e.x(l[o],l[o+1]),n=e.y(l[o],l[o+1]),l[o]=i,l[o+1]=n;return t};if(e._g=M,e.type=M.win.SVGAngle||M.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML","VML"==e.type){var gt,vt=M.doc.createElement("div");if(vt.innerHTML='<v:shape adj="1"/>',gt=vt.firstChild,gt.style.behavior="url(#default#VML)",!gt||"object"!=typeof gt.adj)return e.type=E;vt=null}e.svg=!(e.vml="VML"==e.type),e._Paper=S,e.fn=_=S.prototype=e.prototype,e._id=0,e._oid=0,e.is=function(t,e){return e=Y.call(e),"finite"==e?!X[C](+t):"array"==e?t instanceof Array:"null"==e&&null===t||e==typeof t&&null!==t||"object"==e&&t===Object(t)||"array"==e&&Array.isArray&&Array.isArray(t)||V.call(t).slice(8,-1).toLowerCase()==e},e.angle=function(t,i,n,r,o,s){if(null==o){var a=t-n,l=i-r;return a||l?(180+180*H.atan2(-l,-a)/B+360)%360:0}return e.angle(t,i,o,s)-e.angle(n,r,o,s)},e.rad=function(t){return t%360*B/180},e.deg=function(t){return Math.round(180*t/B%360*1e3)/1e3},e.snapTo=function(t,i,n){if(n=e.is(n,"finite")?n:10,e.is(t,U)){for(var r=t.length;r--;)if(W(t[r]-i)<=n)return t[r]}else{t=+t;var o=i%t;if(n>o)return i-o;if(o>t-n)return i-o+t}return i},e.createUUID=function(t,e){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(t,e).toUpperCase()}}(/[xy]/g,function(t){var e=16*H.random()|0,i="x"==t?e:3&e|8;return i.toString(16)}),e.setWindow=function(i){t("raphael.setWindow",e,M.win,i),M.win=i,M.doc=M.win.document,e._engine.initWin&&e._engine.initWin(M.win)};var yt=function(t){if(e.vml){var i,n=/^\s+|\s+$/g;try{var o=new ActiveXObject("htmlfile");o.write("<body>"),o.close(),i=o.body}catch(t){i=createPopup().document.body}var s=i.createTextRange();yt=r(function(t){try{i.style.color=P(t).replace(n,E);var e=s.queryCommandValue("ForeColor");return e=(255&e)<<16|65280&e|(16711680&e)>>>16,"#"+("000000"+e.toString(16)).slice(-6)}catch(t){return"none"}})}else{var a=M.doc.createElement("i");a.title="Rapha\xebl Colour Picker",a.style.display="none",M.doc.body.appendChild(a),yt=r(function(t){return a.style.color=t,M.doc.defaultView.getComputedStyle(a,E).getPropertyValue("color")})}return yt(t)},bt=function(){return"hsb("+[this.h,this.s,this.b]+")"},_t=function(){return"hsl("+[this.h,this.s,this.l]+")"},wt=function(){return this.hex},xt=function(t,i,n){if(null==i&&e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t&&(n=t.b,i=t.g,t=t.r),null==i&&e.is(t,q)){var r=e.getRGB(t);t=r.r,i=r.g,n=r.b}return(t>1||i>1||n>1)&&(t/=255,i/=255,n/=255),[t,i,n]},kt=function(t,i,n,r){t*=255,i*=255,n*=255;var o={r:t,g:i,b:n,hex:e.rgb(t,i,n),toString:wt};return e.is(r,"finite")&&(o.opacity=r),o};e.color=function(t){var i;return e.is(t,"object")&&"h"in t&&"s"in t&&"b"in t?(i=e.hsb2rgb(t),t.r=i.r,t.g=i.g,t.b=i.b,t.hex=i.hex):e.is(t,"object")&&"h"in t&&"s"in t&&"l"in t?(i=e.hsl2rgb(t),t.r=i.r,t.g=i.g,t.b=i.b,t.hex=i.hex):(e.is(t,"string")&&(t=e.getRGB(t)),e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t?(i=e.rgb2hsl(t),t.h=i.h,t.s=i.s,t.l=i.l,i=e.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=wt,t},e.hsb2rgb=function(t,e,i,n){this.is(t,"object")&&"h"in t&&"s"in t&&"b"in t&&(i=t.b,e=t.s,n=t.o,t=t.h),t*=360;var r,o,s,a,l;return t=t%360/60,l=i*e,a=l*(1-W(t%2-1)),r=o=s=i-l,t=~~t,r+=[l,a,0,0,a,l][t],o+=[a,l,l,a,0,0][t],s+=[0,0,a,l,l,a][t],kt(r,o,s,n)},e.hsl2rgb=function(t,e,i,n){this.is(t,"object")&&"h"in t&&"s"in t&&"l"in t&&(i=t.l,e=t.s,t=t.h),(t>1||e>1||i>1)&&(t/=360,e/=100,i/=100),t*=360;var r,o,s,a,l;return t=t%360/60,l=2*e*(.5>i?i:1-i),a=l*(1-W(t%2-1)),r=o=s=i-l/2,t=~~t,r+=[l,a,0,0,a,l][t],o+=[a,l,l,a,0,0][t],s+=[0,0,a,l,l,a][t],kt(r,o,s,n)},e.rgb2hsb=function(t,e,i){i=xt(t,e,i),t=i[0],e=i[1],i=i[2];var n,r,o,s;return o=F(t,e,i),s=o-R(t,e,i),n=0==s?null:o==t?(e-i)/s:o==e?(i-t)/s+2:(t-e)/s+4,n=(n+360)%6*60/360,r=0==s?0:s/o,{h:n,s:r,b:o,toString:bt}},e.rgb2hsl=function(t,e,i){i=xt(t,e,i),t=i[0],e=i[1],i=i[2];var n,r,o,s,a,l;return s=F(t,e,i),a=R(t,e,i),l=s-a,n=0==l?null:s==t?(e-i)/l:s==e?(i-t)/l+2:(t-e)/l+4,n=(n+360)%6*60/360,o=(s+a)/2,r=0==l?0:.5>o?l/(2*o):l/(2-2*o),{h:n,s:r,l:o,toString:_t}},e._path2string=function(){return this.join(",").replace(ot,"$1")},e._preload=function(t,e){var i=M.doc.createElement("img");i.style.cssText="position:absolute;left:-9999em;top:-9999em",i.onload=function(){e.call(this),this.onload=null,M.doc.body.removeChild(this)},i.onerror=function(){M.doc.body.removeChild(this)},M.doc.body.appendChild(i),i.src=t},e.getRGB=r(function(t){if(!t||(t=P(t)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:o};if("none"==t)return{r:-1,g:-1,b:-1,hex:"none",toString:o};!(rt[C](t.toLowerCase().substring(0,2))||"#"==t.charAt())&&(t=yt(t));var i,n,r,s,a,l,u=t.match(G);return u?(u[2]&&(r=Z(u[2].substring(5),16),n=Z(u[2].substring(3,5),16),i=Z(u[2].substring(1,3),16)),u[3]&&(r=Z((a=u[3].charAt(3))+a,16),n=Z((a=u[3].charAt(2))+a,16),i=Z((a=u[3].charAt(1))+a,16)),u[4]&&(l=u[4][O](nt),i=Q(l[0]),"%"==l[0].slice(-1)&&(i*=2.55),n=Q(l[1]),"%"==l[1].slice(-1)&&(n*=2.55),r=Q(l[2]),"%"==l[2].slice(-1)&&(r*=2.55),"rgba"==u[1].toLowerCase().slice(0,4)&&(s=Q(l[3])),l[3]&&"%"==l[3].slice(-1)&&(s/=100)),u[5]?(l=u[5][O](nt),i=Q(l[0]),"%"==l[0].slice(-1)&&(i*=2.55),n=Q(l[1]),"%"==l[1].slice(-1)&&(n*=2.55),r=Q(l[2]),"%"==l[2].slice(-1)&&(r*=2.55),("deg"==l[0].slice(-3)||"\xb0"==l[0].slice(-1))&&(i/=360),"hsba"==u[1].toLowerCase().slice(0,4)&&(s=Q(l[3])),l[3]&&"%"==l[3].slice(-1)&&(s/=100),e.hsb2rgb(i,n,r,s)):u[6]?(l=u[6][O](nt),i=Q(l[0]),"%"==l[0].slice(-1)&&(i*=2.55),n=Q(l[1]),"%"==l[1].slice(-1)&&(n*=2.55),r=Q(l[2]),"%"==l[2].slice(-1)&&(r*=2.55),("deg"==l[0].slice(-3)||"\xb0"==l[0].slice(-1))&&(i/=360),"hsla"==u[1].toLowerCase().slice(0,4)&&(s=Q(l[3])),l[3]&&"%"==l[3].slice(-1)&&(s/=100),e.hsl2rgb(i,n,r,s)):(u={r:i,g:n,b:r,toString:o},u.hex="#"+(16777216|r|n<<8|i<<16).toString(16).slice(1),e.is(s,"finite")&&(u.opacity=s),u)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:o}},e),e.hsb=r(function(t,i,n){return e.hsb2rgb(t,i,n).hex}),e.hsl=r(function(t,i,n){return e.hsl2rgb(t,i,n).hex}),e.rgb=r(function(t,e,i){function n(t){return t+.5|0}return"#"+(16777216|n(i)|n(e)<<8|n(t)<<16).toString(16).slice(1)}),e.getColor=function(t){var e=this.getColor.start=this.getColor.start||{h:0,s:1,b:t||.75},i=this.hsb2rgb(e.h,e.s,e.b);return e.h+=.075,e.h>1&&(e.h=0,e.s-=.2,e.s<=0&&(this.getColor.start={h:0,s:1,b:e.b})),i.hex},e.getColor.reset=function(){delete this.start},e.parsePathString=function(t){if(!t)return null;var i=Ct(t);if(i.arr)return Tt(i.arr);var n={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},r=[];return e.is(t,U)&&e.is(t[0],U)&&(r=Tt(t)),r.length||P(t).replace(st,function(t,e,i){var o=[],s=e.toLowerCase();if(i.replace(lt,function(t,e){e&&o.push(+e)}),"m"==s&&o.length>2&&(r.push([e][L](o.splice(0,2))),s="l",e="m"==e?"l":"L"),"r"==s)r.push([e][L](o));else for(;o.length>=n[s]&&(r.push([e][L](o.splice(0,n[s]))),n[s]););}),r.toString=e._path2string,i.arr=Tt(r),r},e.parseTransformString=r(function(t){if(!t)return null;var i=[];return e.is(t,U)&&e.is(t[0],U)&&(i=Tt(t)),i.length||P(t).replace(at,function(t,e,n){var r=[];Y.call(e),n.replace(lt,function(t,e){e&&r.push(+e)}),i.push([e][L](r))}),i.toString=e._path2string,i});var Ct=function(t){var e=Ct.ps=Ct.ps||{};return e[t]?e[t].sleep=100:e[t]={sleep:100},setTimeout(function(){for(var i in e)e[C](i)&&i!=t&&(e[i].sleep--,!e[i].sleep&&delete e[i])}),e[t]};e.findDotsAtSegment=function(t,e,i,n,r,o,s,a,l){var u=1-l,c=z(u,3),h=z(u,2),d=l*l,p=d*l,f=c*t+3*h*l*i+3*u*l*l*r+p*s,m=c*e+3*h*l*n+3*u*l*l*o+p*a,g=t+2*l*(i-t)+d*(r-2*i+t),v=e+2*l*(n-e)+d*(o-2*n+e),y=i+2*l*(r-i)+d*(s-2*r+i),b=n+2*l*(o-n)+d*(a-2*o+n),_=u*t+l*i,w=u*e+l*n,x=u*r+l*s,k=u*o+l*a,C=90-180*H.atan2(g-y,v-b)/B;return(g>y||b>v)&&(C+=180),{x:f,y:m,m:{x:g,y:v},n:{x:y,y:b},start:{x:_,y:w},end:{x:x,y:k},alpha:C}},e.bezierBBox=function(t,i,n,r,o,s,a,l){e.is(t,"array")||(t=[t,i,n,r,o,s,a,l]);var u=Pt.apply(null,t);return{x:u.min.x,y:u.min.y,x2:u.max.x,y2:u.max.y,width:u.max.x-u.min.x,height:u.max.y-u.min.y}},e.isPointInsideBBox=function(t,e,i){return e>=t.x&&e<=t.x2&&i>=t.y&&i<=t.y2},e.isBBoxIntersect=function(t,i){var n=e.isPointInsideBBox;return n(i,t.x,t.y)||n(i,t.x2,t.y)||n(i,t.x,t.y2)||n(i,t.x2,t.y2)||n(t,i.x,i.y)||n(t,i.x2,i.y)||n(t,i.x,i.y2)||n(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)},e.pathIntersection=function(t,e){return d(t,e)},e.pathIntersectionNumber=function(t,e){return d(t,e,1)},e.isPointInsidePath=function(t,i,n){var r=e.pathBBox(t);return e.isPointInsideBBox(r,i,n)&&d(t,[["M",i,n],["H",r.x2+10]],1)%2==1},e._removedFactory=function(e){return function(){t("raphael.log",null,"Rapha\xebl: you are calling to method \u201c"+e+"\u201d of removed object",e)}};var Mt=e.pathBBox=function(t){var e=Ct(t);if(e.bbox)return i(e.bbox);if(!t)return{x:0,y:0,width:0,height:0,x2:0,y2:0};t=Ot(t);for(var n,r=0,o=0,s=[],a=[],l=0,u=t.length;u>l;l++)if(n=t[l],"M"==n[0])r=n[1],o=n[2],s.push(r),a.push(o);else{var c=Pt(r,o,n[1],n[2],n[3],n[4],n[5],n[6]);s=s[L](c.min.x,c.max.x),a=a[L](c.min.y,c.max.y),r=n[5],o=n[6]}var h=R[D](0,s),d=R[D](0,a),p=F[D](0,s),f=F[D](0,a),m=p-h,g=f-d,v={x:h,y:d,x2:p,y2:f,width:m,height:g,cx:h+m/2,cy:d+g/2};return e.bbox=i(v),v},Tt=function(t){var n=i(t);return n.toString=e._path2string,n},St=e._pathToRelative=function(t){var i=Ct(t);if(i.rel)return Tt(i.rel);e.is(t,U)&&e.is(t&&t[0],U)||(t=e.parsePathString(t));var n=[],r=0,o=0,s=0,a=0,l=0;"M"==t[0][0]&&(r=t[0][1],o=t[0][2],s=r,a=o,l++,n.push(["M",r,o]));for(var u=l,c=t.length;c>u;u++){var h=n[u]=[],d=t[u];if(d[0]!=Y.call(d[0]))switch(h[0]=Y.call(d[0]),h[0]){case"a":h[1]=d[1],h[2]=d[2],h[3]=d[3],h[4]=d[4],h[5]=d[5],h[6]=+(d[6]-r).toFixed(3),h[7]=+(d[7]-o).toFixed(3);break;case"v":h[1]=+(d[1]-o).toFixed(3);break;case"m":s=d[1],a=d[2];default:for(var p=1,f=d.length;f>p;p++)h[p]=+(d[p]-(p%2?r:o)).toFixed(3)}else{h=n[u]=[],"m"==d[0]&&(s=d[1]+r,a=d[2]+o);for(var m=0,g=d.length;g>m;m++)n[u][m]=d[m]}var v=n[u].length;switch(n[u][0]){case"z":r=s,o=a;break;case"h":r+=+n[u][v-1];break;case"v":o+=+n[u][v-1];break;default:r+=+n[u][v-2],o+=+n[u][v-1]}}return n.toString=e._path2string,i.rel=Tt(n),n},Dt=e._pathToAbsolute=function(t){var i=Ct(t);if(i.abs)return Tt(i.abs);if(e.is(t,U)&&e.is(t&&t[0],U)||(t=e.parsePathString(t)),!t||!t.length)return[["M",0,0]];var n=[],r=0,o=0,a=0,l=0,u=0;"M"==t[0][0]&&(r=+t[0][1],o=+t[0][2],a=r,l=o,u++,n[0]=["M",r,o]);for(var c,h,d=3==t.length&&"M"==t[0][0]&&"R"==t[1][0].toUpperCase()&&"Z"==t[2][0].toUpperCase(),p=u,f=t.length;f>p;p++){if(n.push(c=[]),h=t[p],h[0]!=tt.call(h[0]))switch(c[0]=tt.call(h[0]),c[0]){case"A":c[1]=h[1],c[2]=h[2],c[3]=h[3],c[4]=h[4],c[5]=h[5],c[6]=+(h[6]+r),c[7]=+(h[7]+o);break;case"V":c[1]=+h[1]+o;break;case"H":c[1]=+h[1]+r;break;case"R":for(var m=[r,o][L](h.slice(1)),g=2,v=m.length;v>g;g++)m[g]=+m[g]+r,m[++g]=+m[g]+o;n.pop(),n=n[L](s(m,d));break;case"M":a=+h[1]+r,l=+h[2]+o;default:for(g=1,v=h.length;v>g;g++)c[g]=+h[g]+(g%2?r:o)}else if("R"==h[0])m=[r,o][L](h.slice(1)),n.pop(),n=n[L](s(m,d)),c=["R"][L](h.slice(-2));else for(var y=0,b=h.length;b>y;y++)c[y]=h[y];switch(c[0]){case"Z":r=a,o=l;break;case"H":r=c[1];break;case"V":o=c[1];break;case"M":a=c[c.length-2],l=c[c.length-1];default:r=c[c.length-2],o=c[c.length-1]}}return n.toString=e._path2string,i.abs=Tt(n),n},Lt=function(t,e,i,n){return[t,e,i,n,i,n]},At=function(t,e,i,n,r,o){var s=1/3,a=2/3;return[s*t+a*i,s*e+a*n,s*r+a*i,s*o+a*n,r,o]},Et=function(t,e,i,n,o,s,a,l,u,c){var h,d=120*B/180,p=B/180*(+o||0),f=[],m=r(function(t,e,i){var n=t*H.cos(i)-e*H.sin(i),r=t*H.sin(i)+e*H.cos(i);return{x:n,y:r}});if(c)C=c[0],M=c[1],x=c[2],k=c[3];else{h=m(t,e,-p),t=h.x,e=h.y,h=m(l,u,-p),l=h.x,u=h.y;var g=(H.cos(B/180*o),H.sin(B/180*o),(t-l)/2),v=(e-u)/2,y=g*g/(i*i)+v*v/(n*n);y>1&&(y=H.sqrt(y),i=y*i,n=y*n);var b=i*i,_=n*n,w=(s==a?-1:1)*H.sqrt(W((b*_-b*v*v-_*g*g)/(b*v*v+_*g*g))),x=w*i*v/n+(t+l)/2,k=w*-n*g/i+(e+u)/2,C=H.asin(((e-k)/n).toFixed(9)),M=H.asin(((u-k)/n).toFixed(9));C=x>t?B-C:C,M=x>l?B-M:M,0>C&&(C=2*B+C),0>M&&(M=2*B+M),a&&C>M&&(C-=2*B),!a&&M>C&&(M-=2*B)}var T=M-C;if(W(T)>d){var S=M,D=l,A=u;M=C+d*(a&&M>C?1:-1),l=x+i*H.cos(M),u=k+n*H.sin(M),f=Et(l,u,i,n,o,0,a,D,A,[M,S,x,k])}T=M-C;var E=H.cos(C),I=H.sin(C),P=H.cos(M),j=H.sin(M),N=H.tan(T/4),Y=4/3*i*N,F=4/3*n*N,R=[t,e],z=[t+Y*I,e-F*E],$=[l+Y*j,u-F*P],q=[l,u];if(z[0]=2*R[0]-z[0],z[1]=2*R[1]-z[1],c)return[z,$,q][L](f);f=[z,$,q][L](f).join()[O](",");for(var U=[],V=0,G=f.length;G>V;V++)U[V]=V%2?m(f[V-1],f[V],p).y:m(f[V],f[V+1],p).x;return U},It=function(t,e,i,n,r,o,s,a,l){var u=1-l;return{x:z(u,3)*t+3*z(u,2)*l*i+3*u*l*l*r+z(l,3)*s,y:z(u,3)*e+3*z(u,2)*l*n+3*u*l*l*o+z(l,3)*a}},Pt=r(function(t,e,i,n,r,o,s,a){var l,u=r-2*i+t-(s-2*r+i),c=2*(i-t)-2*(r-i),h=t-i,d=(-c+H.sqrt(c*c-4*u*h))/2/u,p=(-c-H.sqrt(c*c-4*u*h))/2/u,f=[e,a],m=[t,s];return W(d)>"1e12"&&(d=.5),W(p)>"1e12"&&(p=.5),d>0&&1>d&&(l=It(t,e,i,n,r,o,s,a,d),m.push(l.x),f.push(l.y)),p>0&&1>p&&(l=It(t,e,i,n,r,o,s,a,p),m.push(l.x),f.push(l.y)),u=o-2*n+e-(a-2*o+n),c=2*(n-e)-2*(o-n),h=e-n,d=(-c+H.sqrt(c*c-4*u*h))/2/u,p=(-c-H.sqrt(c*c-4*u*h))/2/u,W(d)>"1e12"&&(d=.5),W(p)>"1e12"&&(p=.5),d>0&&1>d&&(l=It(t,e,i,n,r,o,s,a,d),m.push(l.x),f.push(l.y)),p>0&&1>p&&(l=It(t,e,i,n,r,o,s,a,p),m.push(l.x),f.push(l.y)),{min:{x:R[D](0,m),y:R[D](0,f)},max:{x:F[D](0,m),y:F[D](0,f)}}}),Ot=e._path2curve=r(function(t,e){var i=!e&&Ct(t);if(!e&&i.curve)return Tt(i.curve);for(var n=Dt(t),r=e&&Dt(e),o={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},s={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},a=(function(t,e,i){var n,r,o={T:1,Q:1};if(!t)return["C",e.x,e.y,e.x,e.y,e.x,e.y];switch(!(t[0]in o)&&(e.qx=e.qy=null),t[0]){case"M":e.X=t[1],e.Y=t[2];break;case"A":t=["C"][L](Et[D](0,[e.x,e.y][L](t.slice(1))));break;case"S":"C"==i||"S"==i?(n=2*e.x-e.bx,r=2*e.y-e.by):(n=e.x,r=e.y),t=["C",n,r][L](t.slice(1));break;case"T":"Q"==i||"T"==i?(e.qx=2*e.x-e.qx,e.qy=2*e.y-e.qy):(e.qx=e.x,e.qy=e.y),t=["C"][L](At(e.x,e.y,e.qx,e.qy,t[1],t[2]));break;case"Q":e.qx=t[1],e.qy=t[2],t=["C"][L](At(e.x,e.y,t[1],t[2],t[3],t[4]));break;case"L":t=["C"][L](Lt(e.x,e.y,t[1],t[2]));break;case"H":t=["C"][L](Lt(e.x,e.y,t[1],e.y));break;case"V":t=["C"][L](Lt(e.x,e.y,e.x,t[1]));break;case"Z":t=["C"][L](Lt(e.x,e.y,e.X,e.Y))}return t}),l=function(t,e){if(t[e].length>7){t[e].shift();for(var i=t[e];i.length;)c[e]="A",r&&(h[e]="A"),t.splice(e++,0,["C"][L](i.splice(0,6)));t.splice(e,1),m=F(n.length,r&&r.length||0)}},u=function(t,e,i,o,s){t&&e&&"M"==t[s][0]&&"M"!=e[s][0]&&(e.splice(s,0,["M",o.x,o.y]),i.bx=0,i.by=0,i.x=t[s][1],i.y=t[s][2],m=F(n.length,r&&r.length||0))},c=[],h=[],d="",p="",f=0,m=F(n.length,r&&r.length||0);m>f;f++){n[f]&&(d=n[f][0]),"C"!=d&&(c[f]=d,f&&(p=c[f-1])),n[f]=a(n[f],o,p),"A"!=c[f]&&"C"==d&&(c[f]="C"),l(n,f),r&&(r[f]&&(d=r[f][0]),"C"!=d&&(h[f]=d,f&&(p=h[f-1])),r[f]=a(r[f],s,p),"A"!=h[f]&&"C"==d&&(h[f]="C"),l(r,f)),u(n,r,o,s,f),u(r,n,s,o,f);var g=n[f],v=r&&r[f],y=g.length,b=r&&v.length;o.x=g[y-2],o.y=g[y-1],o.bx=Q(g[y-4])||o.x,o.by=Q(g[y-3])||o.y,s.bx=r&&(Q(v[b-4])||s.x),s.by=r&&(Q(v[b-3])||s.y),s.x=r&&v[b-2],s.y=r&&v[b-1]}return r||(i.curve=Tt(n)),r?[n,r]:n},null,Tt),jt=(e._parseDots=r(function(t){for(var i=[],n=0,r=t.length;r>n;n++){var o={},s=t[n].match(/^([^:]*):?([\d\.]*)/);if(o.color=e.getRGB(s[1]),o.color.error)return null;o.opacity=o.color.opacity,o.color=o.color.hex,s[2]&&(o.offset=s[2]+"%"),i.push(o)}for(n=1,r=i.length-1;r>n;n++)if(!i[n].offset){for(var a=Q(i[n-1].offset||0),l=0,u=n+1;r>u;u++)if(i[u].offset){l=i[u].offset;break}l||(l=100,u=r),l=Q(l);for(var c=(l-a)/(u-n+1);u>n;n++)a+=c,i[n].offset=a+"%"}return i}),e._tear=function(t,e){t==e.top&&(e.top=t.prev),t==e.bottom&&(e.bottom=t.next),t.next&&(t.next.prev=t.prev),t.prev&&(t.prev.next=t.next)}),Nt=(e._tofront=function(t,e){e.top!==t&&(jt(t,e),t.next=null,t.prev=e.top,e.top.next=t,e.top=t)},e._toback=function(t,e){e.bottom!==t&&(jt(t,e),t.next=e.bottom,t.prev=null,e.bottom.prev=t,e.bottom=t)},e._insertafter=function(t,e,i){jt(t,i),e==i.top&&(i.top=t),e.next&&(e.next.prev=t),t.next=e.next,t.prev=e,e.next=t},e._insertbefore=function(t,e,i){jt(t,i),e==i.bottom&&(i.bottom=t),e.prev&&(e.prev.next=t),t.prev=e.prev,e.prev=t,t.next=e},e.toMatrix=function(t,e){var i=Mt(t),n={_:{transform:E},getBBox:function(){return i}};return Yt(n,e),n.matrix}),Yt=(e.transformPath=function(t,e){return mt(t,Nt(t,e))},e._extractTransform=function(t,i){if(null==i)return t._.transform;i=P(i).replace(/\.{3}|\u2026/g,t._.transform||E);var n=e.parseTransformString(i),r=0,o=0,s=0,a=1,l=1,u=t._,c=new p;if(u.transform=n||[],n)for(var h=0,d=n.length;d>h;h++){var f,m,g,v,y,b=n[h],_=b.length,w=P(b[0]).toLowerCase(),x=b[0]!=w,k=x?c.invert():0;"t"==w&&3==_?x?(f=k.x(0,0),m=k.y(0,0),g=k.x(b[1],b[2]),v=k.y(b[1],b[2]),c.translate(g-f,v-m)):c.translate(b[1],b[2]):"r"==w?2==_?(y=y||t.getBBox(1),c.rotate(b[1],y.x+y.width/2,y.y+y.height/2),r+=b[1]):4==_&&(x?(g=k.x(b[2],b[3]),v=k.y(b[2],b[3]),c.rotate(b[1],g,v)):c.rotate(b[1],b[2],b[3]),r+=b[1]):"s"==w?2==_||3==_?(y=y||t.getBBox(1),c.scale(b[1],b[_-1],y.x+y.width/2,y.y+y.height/2),a*=b[1],l*=b[_-1]):5==_&&(x?(g=k.x(b[3],b[4]),v=k.y(b[3],b[4]),c.scale(b[1],b[2],g,v)):c.scale(b[1],b[2],b[3],b[4]),a*=b[1],l*=b[2]):"m"==w&&7==_&&c.add(b[1],b[2],b[3],b[4],b[5],b[6]),u.dirtyT=1,t.matrix=c}t.matrix=c,u.sx=a,u.sy=l,u.deg=r,u.dx=o=c.e,u.dy=s=c.f,1==a&&1==l&&!r&&u.bbox?(u.bbox.x+=+o,u.bbox.y+=+s):u.dirtyT=1}),Ht=function(t){var e=t[0];switch(e.toLowerCase()){case"t":return[e,0,0];case"m":return[e,1,0,0,1,0,0];case"r":return 4==t.length?[e,0,t[2],t[3]]:[e,0];case"s":return 5==t.length?[e,1,1,t[3],t[4]]:3==t.length?[e,1,1]:[e,1]}},Ft=e._equaliseTransform=function(t,i){i=P(i).replace(/\.{3}|\u2026/g,t),t=e.parseTransformString(t)||[],i=e.parseTransformString(i)||[];for(var n,r,o,s,a=F(t.length,i.length),l=[],u=[],c=0;a>c;c++){if(o=t[c]||Ht(i[c]),s=i[c]||Ht(o),o[0]!=s[0]||"r"==o[0].toLowerCase()&&(o[2]!=s[2]||o[3]!=s[3])||"s"==o[0].toLowerCase()&&(o[3]!=s[3]||o[4]!=s[4]))return;for(l[c]=[],u[c]=[],n=0,r=F(o.length,s.length);r>n;n++)n in o&&(l[c][n]=o[n]),n in s&&(u[c][n]=s[n])}return{from:l,to:u}};e._getContainer=function(t,i,n,r){var o;return o=null!=r||e.is(t,"object")?t:M.doc.getElementById(t),null!=o?o.tagName?null==i?{container:o,width:o.style.pixelWidth||o.offsetWidth,height:o.style.pixelHeight||o.offsetHeight}:{container:o,width:i,height:n}:{container:1,x:t,y:i,width:n,height:r}:void 0},e.pathToRelative=St,e._engine={},e.path2curve=Ot,e.matrix=function(t,e,i,n,r,o){return new p(t,e,i,n,r,o)},function(t){function i(t){return t[0]*t[0]+t[1]*t[1]}function n(t){var e=H.sqrt(i(t));t[0]&&(t[0]/=e),t[1]&&(t[1]/=e)}t.add=function(t,e,i,n,r,o){var s,a,l,u,c=[[],[],[]],h=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],d=[[t,i,r],[e,n,o],[0,0,1]];for(t&&t instanceof p&&(d=[[t.a,t.c,t.e],[t.b,t.d,t.f],[0,0,1]]),s=0;3>s;s++)for(a=0;3>a;a++){for(u=0,l=0;3>l;l++)u+=h[s][l]*d[l][a];c[s][a]=u}this.a=c[0][0],this.b=c[1][0],this.c=c[0][1],this.d=c[1][1],this.e=c[0][2],this.f=c[1][2]},t.invert=function(){var t=this,e=t.a*t.d-t.b*t.c;return new p(t.d/e,-t.b/e,-t.c/e,t.a/e,(t.c*t.f-t.d*t.e)/e,(t.b*t.e-t.a*t.f)/e)},t.clone=function(){return new p(this.a,this.b,this.c,this.d,this.e,this.f)},t.translate=function(t,e){this.add(1,0,0,1,t,e)},t.scale=function(t,e,i,n){null==e&&(e=t),(i||n)&&this.add(1,0,0,1,i,n),this.add(t,0,0,e,0,0),(i||n)&&this.add(1,0,0,1,-i,-n)},t.rotate=function(t,i,n){t=e.rad(t),i=i||0,n=n||0;var r=+H.cos(t).toFixed(9),o=+H.sin(t).toFixed(9);this.add(r,o,-o,r,i,n),this.add(1,0,0,1,-i,-n)},t.x=function(t,e){return t*this.a+e*this.c+this.e},t.y=function(t,e){return t*this.b+e*this.d+this.f},t.get=function(t){return+this[P.fromCharCode(97+t)].toFixed(4)},t.toString=function(){return e.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={};t.dx=this.e,t.dy=this.f;var r=[[this.a,this.c],[this.b,this.d]];t.scalex=H.sqrt(i(r[0])),n(r[0]),t.shear=r[0][0]*r[1][0]+r[0][1]*r[1][1],r[1]=[r[1][0]-r[0][0]*t.shear,r[1][1]-r[0][1]*t.shear],t.scaley=H.sqrt(i(r[1])),n(r[1]),t.shear/=t.scaley;var o=-r[0][1],s=r[1][1];return 0>s?(t.rotate=e.deg(H.acos(s)),0>o&&(t.rotate=360-t.rotate)):t.rotate=e.deg(H.asin(o)),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(t){var e=t||this[O]();return e.isSimple?(e.scalex=+e.scalex.toFixed(4),e.scaley=+e.scaley.toFixed(4),e.rotate=+e.rotate.toFixed(4),(e.dx||e.dy?"t"+[e.dx,e.dy]:E)+(1!=e.scalex||1!=e.scaley?"s"+[e.scalex,e.scaley,0,0]:E)+(e.rotate?"r"+[e.rotate,0,0]:E)):"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]}}(p.prototype);for(var Rt=function(){this.returnValue=!1},Wt=function(){return this.originalEvent.preventDefault()},zt=function(){this.cancelBubble=!0},Bt=function(){return this.originalEvent.stopPropagation()},$t=function(t){var e=M.doc.documentElement.scrollTop||M.doc.body.scrollTop,i=M.doc.documentElement.scrollLeft||M.doc.body.scrollLeft;return{x:t.clientX+i,y:t.clientY+e}},qt=function(){return M.doc.addEventListener?function(t,e,i,n){var r=function(t){var e=$t(t);return i.call(n,t,e.x,e.y)};if(t.addEventListener(e,r,!1),A&&N[e]){var o=function(e){for(var r=$t(e),o=e,s=0,a=e.targetTouches&&e.targetTouches.length;a>s;s++)if(e.targetTouches[s].target==t){e=e.targetTouches[s],e.originalEvent=o,e.preventDefault=Wt,e.stopPropagation=Bt;break}return i.call(n,e,r.x,r.y)};t.addEventListener(N[e],o,!1)}return function(){return t.removeEventListener(e,r,!1),A&&N[e]&&t.removeEventListener(N[e],o,!1),!0}}:M.doc.attachEvent?function(t,e,i,n){var r=function(t){t=t||M.win.event;var e=M.doc.documentElement.scrollTop||M.doc.body.scrollTop,r=M.doc.documentElement.scrollLeft||M.doc.body.scrollLeft,o=t.clientX+r,s=t.clientY+e;return t.preventDefault=t.preventDefault||Rt,t.stopPropagation=t.stopPropagation||zt,i.call(n,t,o,s)};t.attachEvent("on"+e,r);var o=function(){return t.detachEvent("on"+e,r),!0};return o}:void 0}(),Ut=[],Vt=function(e){for(var i,n=e.clientX,r=e.clientY,o=M.doc.documentElement.scrollTop||M.doc.body.scrollTop,s=M.doc.documentElement.scrollLeft||M.doc.body.scrollLeft,a=Ut.length;a--;){if(i=Ut[a],A&&e.touches){for(var l,u=e.touches.length;u--;)if(l=e.touches[u],l.identifier==i.el._drag.id){n=l.clientX,r=l.clientY,(e.originalEvent?e.originalEvent:e).preventDefault();break}}else e.preventDefault();var c,h=i.el.node,d=h.nextSibling,p=h.parentNode,f=h.style.display;M.win.opera&&p.removeChild(h),h.style.display="none",c=i.el.paper.getElementByPoint(n,r),h.style.display=f,M.win.opera&&(d?p.insertBefore(h,d):p.appendChild(h)),c&&t("raphael.drag.over."+i.el.id,i.el,c),n+=s,r+=o,t("raphael.drag.move."+i.el.id,i.move_scope||i.el,n-i.el._drag.x,r-i.el._drag.y,n,r,e)}},Gt=function(i){e.unmousemove(Vt).unmouseup(Gt);for(var n,r=Ut.length;r--;)n=Ut[r],n.el._drag={},t("raphael.drag.end."+n.el.id,n.end_scope||n.start_scope||n.move_scope||n.el,i);Ut=[]},Xt=e.el={},Jt=j.length;Jt--;)!function(t){e[t]=Xt[t]=function(i,n){return e.is(i,"function")&&(this.events=this.events||[],this.events.push({name:t,f:i,unbind:qt(this.shape||this.node||M.doc,t,i,n||this)})),this},e["un"+t]=Xt["un"+t]=function(i){for(var n=this.events||[],r=n.length;r--;)n[r].name!=t||!e.is(i,"undefined")&&n[r].f!=i||(n[r].unbind(),n.splice(r,1),!n.length&&delete this.events);return this}}(j[Jt]);Xt.data=function(i,n){var r=ut[this.id]=ut[this.id]||{};if(0==arguments.length)return r;if(1==arguments.length){if(e.is(i,"object")){for(var o in i)i[C](o)&&this.data(o,i[o]);return this}return t("raphael.data.get."+this.id,this,r[i],i),r[i]}return r[i]=n,t("raphael.data.set."+this.id,this,n,i),this},Xt.removeData=function(t){return null==t?ut[this.id]={}:ut[this.id]&&delete ut[this.id][t],this},Xt.getData=function(){return i(ut[this.id]||{})},Xt.hover=function(t,e,i,n){return this.mouseover(t,i).mouseout(e,n||i)},Xt.unhover=function(t,e){return this.unmouseover(t).unmouseout(e)};var Kt=[];Xt.drag=function(i,n,r,o,s,a){function l(l){(l.originalEvent||l).preventDefault();var u=l.clientX,c=l.clientY,h=M.doc.documentElement.scrollTop||M.doc.body.scrollTop,d=M.doc.documentElement.scrollLeft||M.doc.body.scrollLeft;if(this._drag.id=l.identifier,A&&l.touches)for(var p,f=l.touches.length;f--;)if(p=l.touches[f],this._drag.id=p.identifier,p.identifier==this._drag.id){u=p.clientX,c=p.clientY;break}this._drag.x=u+d,this._drag.y=c+h,!Ut.length&&e.mousemove(Vt).mouseup(Gt),Ut.push({el:this,move_scope:o,start_scope:s,end_scope:a}),n&&t.on("raphael.drag.start."+this.id,n),i&&t.on("raphael.drag.move."+this.id,i),r&&t.on("raphael.drag.end."+this.id,r),t("raphael.drag.start."+this.id,s||o||this,l.clientX+d,l.clientY+h,l)}return this._drag={},Kt.push({el:this,start:l}),this.mousedown(l),this},Xt.onDragOver=function(e){e?t.on("raphael.drag.over."+this.id,e):t.unbind("raphael.drag.over."+this.id)},Xt.undrag=function(){for(var i=Kt.length;i--;)Kt[i].el==this&&(this.unmousedown(Kt[i].start),Kt.splice(i,1),t.unbind("raphael.drag.*."+this.id));!Kt.length&&e.unmousemove(Vt).unmouseup(Gt),Ut=[]},_.circle=function(t,i,n){var r=e._engine.circle(this,t||0,i||0,n||0);return this.__set__&&this.__set__.push(r),r},_.rect=function(t,i,n,r,o){var s=e._engine.rect(this,t||0,i||0,n||0,r||0,o||0);return this.__set__&&this.__set__.push(s),
s},_.ellipse=function(t,i,n,r){var o=e._engine.ellipse(this,t||0,i||0,n||0,r||0);return this.__set__&&this.__set__.push(o),o},_.path=function(t){t&&!e.is(t,q)&&!e.is(t[0],U)&&(t+=E);var i=e._engine.path(e.format[D](e,arguments),this);return this.__set__&&this.__set__.push(i),i},_.image=function(t,i,n,r,o){var s=e._engine.image(this,t||"about:blank",i||0,n||0,r||0,o||0);return this.__set__&&this.__set__.push(s),s},_.text=function(t,i,n){var r=e._engine.text(this,t||0,i||0,P(n));return this.__set__&&this.__set__.push(r),r},_.set=function(t){!e.is(t,"array")&&(t=Array.prototype.splice.call(arguments,0,arguments.length));var i=new ue(t);return this.__set__&&this.__set__.push(i),i.paper=this,i.type="set",i},_.setStart=function(t){this.__set__=t||this.set()},_.setFinish=function(){var t=this.__set__;return delete this.__set__,t},_.getSize=function(){var t=this.canvas.parentNode;return{width:t.offsetWidth,height:t.offsetHeight}},_.setSize=function(t,i){return e._engine.setSize.call(this,t,i)},_.setViewBox=function(t,i,n,r,o){return e._engine.setViewBox.call(this,t,i,n,r,o)},_.top=_.bottom=null,_.raphael=e;var Qt=function(t){var e=t.getBoundingClientRect(),i=t.ownerDocument,n=i.body,r=i.documentElement,o=r.clientTop||n.clientTop||0,s=r.clientLeft||n.clientLeft||0,a=e.top+(M.win.pageYOffset||r.scrollTop||n.scrollTop)-o,l=e.left+(M.win.pageXOffset||r.scrollLeft||n.scrollLeft)-s;return{y:a,x:l}};_.getElementByPoint=function(t,e){var i=this,n=i.canvas,r=M.doc.elementFromPoint(t,e);if(M.win.opera&&"svg"==r.tagName){var o=Qt(n),s=n.createSVGRect();s.x=t-o.x,s.y=e-o.y,s.width=s.height=1;var a=n.getIntersectionList(s,null);a.length&&(r=a[a.length-1])}if(!r)return null;for(;r.parentNode&&r!=n.parentNode&&!r.raphael;)r=r.parentNode;return r==i.canvas.parentNode&&(r=n),r=r&&r.raphael?i.getById(r.raphaelid):null},_.getElementsByBBox=function(t){var i=this.set();return this.forEach(function(n){e.isBBoxIntersect(n.getBBox(),t)&&i.push(n)}),i},_.getById=function(t){for(var e=this.bottom;e;){if(e.id==t)return e;e=e.next}return null},_.forEach=function(t,e){for(var i=this.bottom;i;){if(t.call(e,i)===!1)return this;i=i.next}return this},_.getElementsByPoint=function(t,e){var i=this.set();return this.forEach(function(n){n.isPointInside(t,e)&&i.push(n)}),i},Xt.isPointInside=function(t,i){var n=this.realPath=ft[this.type](this);return this.attr("transform")&&this.attr("transform").length&&(n=e.transformPath(n,this.attr("transform"))),e.isPointInsidePath(n,t,i)},Xt.getBBox=function(t){if(this.removed)return{};var e=this._;return t?((e.dirty||!e.bboxwt)&&(this.realPath=ft[this.type](this),e.bboxwt=Mt(this.realPath),e.bboxwt.toString=f,e.dirty=0),e.bboxwt):((e.dirty||e.dirtyT||!e.bbox)&&((e.dirty||!this.realPath)&&(e.bboxwt=0,this.realPath=ft[this.type](this)),e.bbox=Mt(mt(this.realPath,this.matrix)),e.bbox.toString=f,e.dirty=e.dirtyT=0),e.bbox)},Xt.clone=function(){if(this.removed)return null;var t=this.paper[this.type]().attr(this.attr());return this.__set__&&this.__set__.push(t),t},Xt.glow=function(t){if("text"==this.type)return null;t=t||{};var e={width:(t.width||10)+(+this.attr("stroke-width")||1),fill:t.fill||!1,opacity:null==t.opacity?.5:t.opacity,offsetx:t.offsetx||0,offsety:t.offsety||0,color:t.color||"#000"},i=e.width/2,n=this.paper,r=n.set(),o=this.realPath||ft[this.type](this);o=this.matrix?mt(o,this.matrix):o;for(var s=1;i+1>s;s++)r.push(n.path(o).attr({stroke:e.color,fill:e.fill?e.color:"none","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(e.width/i*s).toFixed(3),opacity:+(e.opacity/i).toFixed(3)}));return r.insertBefore(this).translate(e.offsetx,e.offsety)};var Zt=function(t,i,n,r,o,s,a,c,h){return null==h?l(t,i,n,r,o,s,a,c):e.findDotsAtSegment(t,i,n,r,o,s,a,c,u(t,i,n,r,o,s,a,c,h))},te=function(t,i){return function(n,r,o){n=Ot(n);for(var s,a,l,u,c,h="",d={},p=0,f=0,m=n.length;m>f;f++){if(l=n[f],"M"==l[0])s=+l[1],a=+l[2];else{if(u=Zt(s,a,l[1],l[2],l[3],l[4],l[5],l[6]),p+u>r){if(i&&!d.start){if(c=Zt(s,a,l[1],l[2],l[3],l[4],l[5],l[6],r-p),h+=["C"+c.start.x,c.start.y,c.m.x,c.m.y,c.x,c.y],o)return h;d.start=h,h=["M"+c.x,c.y+"C"+c.n.x,c.n.y,c.end.x,c.end.y,l[5],l[6]].join(),p+=u,s=+l[5],a=+l[6];continue}if(!t&&!i)return c=Zt(s,a,l[1],l[2],l[3],l[4],l[5],l[6],r-p),{x:c.x,y:c.y,alpha:c.alpha}}p+=u,s=+l[5],a=+l[6]}h+=l.shift()+l}return d.end=h,c=t?p:i?d:e.findDotsAtSegment(s,a,l[0],l[1],l[2],l[3],l[4],l[5],1),c.alpha&&(c={x:c.x,y:c.y,alpha:c.alpha}),c}},ee=te(1),ie=te(),ne=te(0,1);e.getTotalLength=ee,e.getPointAtLength=ie,e.getSubpath=function(t,e,i){if(this.getTotalLength(t)-i<1e-6)return ne(t,e).end;var n=ne(t,i,1);return e?ne(n,e).end:n},Xt.getTotalLength=function(){var t=this.getPath();if(t)return this.node.getTotalLength?this.node.getTotalLength():ee(t)},Xt.getPointAtLength=function(t){var e=this.getPath();if(e)return ie(e,t)},Xt.getPath=function(){var t,i=e._getPath[this.type];if("text"!=this.type&&"set"!=this.type)return i&&(t=i(this)),t},Xt.getSubpath=function(t,i){var n=this.getPath();if(n)return e.getSubpath(n,t,i)};var re=e.easing_formulas={linear:function(t){return t},"<":function(t){return z(t,1.7)},">":function(t){return z(t,.48)},"<>":function(t){var e=.48-t/1.04,i=H.sqrt(.1734+e*e),n=i-e,r=z(W(n),1/3)*(0>n?-1:1),o=-i-e,s=z(W(o),1/3)*(0>o?-1:1),a=r+s+.5;return 3*(1-a)*a*a+a*a*a},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){t-=1;var e=1.70158;return t*t*((e+1)*t+e)+1},elastic:function(t){return t==!!t?t:z(2,-10*t)*H.sin(2*(t-.075)*B/.3)+1},bounce:function(t){var e,i=7.5625,n=2.75;return 1/n>t?e=i*t*t:2/n>t?(t-=1.5/n,e=i*t*t+.75):2.5/n>t?(t-=2.25/n,e=i*t*t+.9375):(t-=2.625/n,e=i*t*t+.984375),e}};re.easeIn=re["ease-in"]=re["<"],re.easeOut=re["ease-out"]=re[">"],re.easeInOut=re["ease-in-out"]=re["<>"],re["back-in"]=re.backIn,re["back-out"]=re.backOut;var oe=[],se=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){setTimeout(t,16)},ae=function(){for(var i=+new Date,n=0;n<oe.length;n++){var r=oe[n];if(!r.el.removed&&!r.paused){var o,s,a=i-r.start,l=r.ms,u=r.easing,c=r.from,h=r.diff,d=r.to,p=(r.t,r.el),f={},m={};if(r.initstatus?(a=(r.initstatus*r.anim.top-r.prev)/(r.percent-r.prev)*l,r.status=r.initstatus,delete r.initstatus,r.stop&&oe.splice(n--,1)):r.status=(r.prev+(r.percent-r.prev)*(a/l))/r.anim.top,!(0>a))if(l>a){var g=u(a/l);for(var y in c)if(c[C](y)){switch(it[y]){case $:o=+c[y]+g*l*h[y];break;case"colour":o="rgb("+[le(K(c[y].r+g*l*h[y].r)),le(K(c[y].g+g*l*h[y].g)),le(K(c[y].b+g*l*h[y].b))].join(",")+")";break;case"path":o=[];for(var b=0,_=c[y].length;_>b;b++){o[b]=[c[y][b][0]];for(var w=1,x=c[y][b].length;x>w;w++)o[b][w]=+c[y][b][w]+g*l*h[y][b][w];o[b]=o[b].join(I)}o=o.join(I);break;case"transform":if(h[y].real)for(o=[],b=0,_=c[y].length;_>b;b++)for(o[b]=[c[y][b][0]],w=1,x=c[y][b].length;x>w;w++)o[b][w]=c[y][b][w]+g*l*h[y][b][w];else{var k=function(t){return+c[y][t]+g*l*h[y][t]};o=[["m",k(0),k(1),k(2),k(3),k(4),k(5)]]}break;case"csv":if("clip-rect"==y)for(o=[],b=4;b--;)o[b]=+c[y][b]+g*l*h[y][b];break;default:var M=[][L](c[y]);for(o=[],b=p.paper.customAttributes[y].length;b--;)o[b]=+M[b]+g*l*h[y][b]}f[y]=o}p.attr(f),function(e,i,n){setTimeout(function(){t("raphael.anim.frame."+e,i,n)})}(p.id,p,r.anim)}else{if(function(i,n,r){setTimeout(function(){t("raphael.anim.frame."+n.id,n,r),t("raphael.anim.finish."+n.id,n,r),e.is(i,"function")&&i.call(n)})}(r.callback,p,r.anim),p.attr(d),oe.splice(n--,1),r.repeat>1&&!r.next){for(s in d)d[C](s)&&(m[s]=r.totalOrigin[s]);r.el.attr(m),v(r.anim,r.el,r.anim.percents[0],null,r.totalOrigin,r.repeat-1)}r.next&&!r.stop&&v(r.anim,r.el,r.next,null,r.totalOrigin,r.repeat)}}}oe.length&&se(ae)},le=function(t){return t>255?255:0>t?0:t};Xt.animateWith=function(t,i,n,r,o,s){var a=this;if(a.removed)return s&&s.call(a),a;var l=n instanceof g?n:e.animation(n,r,o,s);v(l,a,l.percents[0],null,a.attr());for(var u=0,c=oe.length;c>u;u++)if(oe[u].anim==i&&oe[u].el==t){oe[c-1].start=oe[u].start;break}return a},Xt.onAnimation=function(e){return e?t.on("raphael.anim.frame."+this.id,e):t.unbind("raphael.anim.frame."+this.id),this},g.prototype.delay=function(t){var e=new g(this.anim,this.ms);return e.times=this.times,e.del=+t||0,e},g.prototype.repeat=function(t){var e=new g(this.anim,this.ms);return e.del=this.del,e.times=H.floor(F(t,0))||1,e},e.animation=function(t,i,n,r){if(t instanceof g)return t;(e.is(n,"function")||!n)&&(r=r||n||null,n=null),t=Object(t),i=+i||0;var o,s,a={};for(s in t)t[C](s)&&Q(s)!=s&&Q(s)+"%"!=s&&(o=!0,a[s]=t[s]);if(o)return n&&(a.easing=n),r&&(a.callback=r),new g({100:a},i);if(r){var l=0;for(var u in t){var c=Z(u);t[C](u)&&c>l&&(l=c)}l+="%",!t[l].callback&&(t[l].callback=r)}return new g(t,i)},Xt.animate=function(t,i,n,r){var o=this;if(o.removed)return r&&r.call(o),o;var s=t instanceof g?t:e.animation(t,i,n,r);return v(s,o,s.percents[0],null,o.attr()),o},Xt.setTime=function(t,e){return t&&null!=e&&this.status(t,R(e,t.ms)/t.ms),this},Xt.status=function(t,e){var i,n,r=[],o=0;if(null!=e)return v(t,this,-1,R(e,1)),this;for(i=oe.length;i>o;o++)if(n=oe[o],n.el.id==this.id&&(!t||n.anim==t)){if(t)return n.status;r.push({anim:n.anim,status:n.status})}return t?0:r},Xt.pause=function(e){for(var i=0;i<oe.length;i++)oe[i].el.id!=this.id||e&&oe[i].anim!=e||t("raphael.anim.pause."+this.id,this,oe[i].anim)!==!1&&(oe[i].paused=!0);return this},Xt.resume=function(e){for(var i=0;i<oe.length;i++)if(oe[i].el.id==this.id&&(!e||oe[i].anim==e)){var n=oe[i];t("raphael.anim.resume."+this.id,this,n.anim)!==!1&&(delete n.paused,this.status(n.anim,n.status))}return this},Xt.stop=function(e){for(var i=0;i<oe.length;i++)oe[i].el.id!=this.id||e&&oe[i].anim!=e||t("raphael.anim.stop."+this.id,this,oe[i].anim)!==!1&&oe.splice(i--,1);return this},t.on("raphael.remove",y),t.on("raphael.clear",y),Xt.toString=function(){return"Rapha\xebl\u2019s object"};var ue=function(t){if(this.items=[],this.length=0,this.type="set",t)for(var e=0,i=t.length;i>e;e++)!t[e]||t[e].constructor!=Xt.constructor&&t[e].constructor!=ue||(this[this.items.length]=this.items[this.items.length]=t[e],this.length++)},ce=ue.prototype;ce.push=function(){for(var t,e,i=0,n=arguments.length;n>i;i++)t=arguments[i],!t||t.constructor!=Xt.constructor&&t.constructor!=ue||(e=this.items.length,this[e]=this.items[e]=t,this.length++);return this},ce.pop=function(){return this.length&&delete this[this.length--],this.items.pop()},ce.forEach=function(t,e){for(var i=0,n=this.items.length;n>i;i++)if(t.call(e,this.items[i],i)===!1)return this;return this};for(var he in Xt)Xt[C](he)&&(ce[he]=function(t){return function(){var e=arguments;return this.forEach(function(i){i[t][D](i,e)})}}(he));return ce.attr=function(t,i){if(t&&e.is(t,U)&&e.is(t[0],"object"))for(var n=0,r=t.length;r>n;n++)this.items[n].attr(t[n]);else for(var o=0,s=this.items.length;s>o;o++)this.items[o].attr(t,i);return this},ce.clear=function(){for(;this.length;)this.pop()},ce.splice=function(t,e){t=0>t?F(this.length+t,0):t,e=F(0,R(this.length-t,e));var i,n=[],r=[],o=[];for(i=2;i<arguments.length;i++)o.push(arguments[i]);for(i=0;e>i;i++)r.push(this[t+i]);for(;i<this.length-t;i++)n.push(this[t+i]);var s=o.length;for(i=0;i<s+n.length;i++)this.items[t+i]=this[t+i]=s>i?o[i]:n[i-s];for(i=this.items.length=this.length-=e-s;this[i];)delete this[i++];return new ue(r)},ce.exclude=function(t){for(var e=0,i=this.length;i>e;e++)if(this[e]==t)return this.splice(e,1),!0},ce.animate=function(t,i,n,r){(e.is(n,"function")||!n)&&(r=n||null);var o,s,a=this.items.length,l=a,u=this;if(!a)return this;r&&(s=function(){!--a&&r.call(u)}),n=e.is(n,q)?n:s;var c=e.animation(t,i,n,s);for(o=this.items[--l].animate(c);l--;)this.items[l]&&!this.items[l].removed&&this.items[l].animateWith(o,c,c),this.items[l]&&!this.items[l].removed||a--;return this},ce.insertAfter=function(t){for(var e=this.items.length;e--;)this.items[e].insertAfter(t);return this},ce.getBBox=function(){for(var t=[],e=[],i=[],n=[],r=this.items.length;r--;)if(!this.items[r].removed){var o=this.items[r].getBBox();t.push(o.x),e.push(o.y),i.push(o.x+o.width),n.push(o.y+o.height)}return t=R[D](0,t),e=R[D](0,e),i=F[D](0,i),n=F[D](0,n),{x:t,y:e,x2:i,y2:n,width:i-t,height:n-e}},ce.clone=function(t){t=this.paper.set();for(var e=0,i=this.items.length;i>e;e++)t.push(this.items[e].clone());return t},ce.toString=function(){return"Rapha\xebl\u2018s set"},ce.glow=function(t){var e=this.paper.set();return this.forEach(function(i){var n=i.glow(t);null!=n&&n.forEach(function(t){e.push(t)})}),e},ce.isPointInside=function(t,e){var i=!1;return this.forEach(function(n){return n.isPointInside(t,e)?(i=!0,!1):void 0}),i},e.registerFont=function(t){if(!t.face)return t;this.fonts=this.fonts||{};var e={w:t.w,face:{},glyphs:{}},i=t.face["font-family"];for(var n in t.face)t.face[C](n)&&(e.face[n]=t.face[n]);if(this.fonts[i]?this.fonts[i].push(e):this.fonts[i]=[e],!t.svg){e.face["units-per-em"]=Z(t.face["units-per-em"],10);for(var r in t.glyphs)if(t.glyphs[C](r)){var o=t.glyphs[r];if(e.glyphs[r]={w:o.w,k:{},d:o.d&&"M"+o.d.replace(/[mlcxtrv]/g,function(t){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[t]||"M"})+"z"},o.k)for(var s in o.k)o[C](s)&&(e.glyphs[r].k[s]=o.k[s])}}return t},_.getFont=function(t,i,n,r){if(r=r||"normal",n=n||"normal",i=+i||{normal:400,bold:700,lighter:300,bolder:800}[i]||400,e.fonts){var o=e.fonts[t];if(!o){var s=new RegExp("(^|\\s)"+t.replace(/[^\w\d\s+!~.:_-]/g,E)+"(\\s|$)","i");for(var a in e.fonts)if(e.fonts[C](a)&&s.test(a)){o=e.fonts[a];break}}var l;if(o)for(var u=0,c=o.length;c>u&&(l=o[u],l.face["font-weight"]!=i||l.face["font-style"]!=n&&l.face["font-style"]||l.face["font-stretch"]!=r);u++);return l}},_.print=function(t,i,n,r,o,s,a,l){s=s||"middle",a=F(R(a||0,1),-1),l=F(R(l||1,3),1);var u,c=P(n)[O](E),h=0,d=0,p=E;if(e.is(r,"string")&&(r=this.getFont(r)),r){u=(o||16)/r.face["units-per-em"];for(var f=r.face.bbox[O](w),m=+f[0],g=f[3]-f[1],v=0,y=+f[1]+("baseline"==s?g+ +r.face.descent:g/2),b=0,_=c.length;_>b;b++){if("\n"==c[b])h=0,k=0,d=0,v+=g*l;else{var x=d&&r.glyphs[c[b-1]]||{},k=r.glyphs[c[b]];h+=d?(x.w||r.w)+(x.k&&x.k[c[b]]||0)+r.w*a:0,d=1}k&&k.d&&(p+=e.transformPath(k.d,["t",h*u,v*u,"s",u,u,m,y,"t",(t-m)/u,(i-y)/u]))}}return this.path(p).attr({fill:"#000",stroke:"none"})},_.add=function(t){if(e.is(t,"array"))for(var i,n=this.set(),r=0,o=t.length;o>r;r++)i=t[r]||{},x[C](i.type)&&n.push(this[i.type]().attr(i));return n},e.format=function(t,i){var n=e.is(i,U)?[0][L](i):arguments;return t&&e.is(t,q)&&n.length-1&&(t=t.replace(k,function(t,e){return null==n[++e]?E:n[e]})),t||E},e.fullfill=function(){var t=/\{([^\}]+)\}/g,e=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,i=function(t,i,n){var r=n;return i.replace(e,function(t,e,i,n,o){e=e||n,r&&(e in r&&(r=r[e]),"function"==typeof r&&o&&(r=r()))}),r=(null==r||r==n?t:r)+""};return function(e,n){return String(e).replace(t,function(t,e){return i(t,e,n)})}}(),e.ninja=function(){return T.was?M.win.Raphael=T.is:delete Raphael,e},e.st=ce,t.on("raphael.DOMload",function(){b=!0}),function(t,i,n){function r(){/in/.test(t.readyState)?setTimeout(r,9):e.eve("raphael.DOMload")}null==t.readyState&&t.addEventListener&&(t.addEventListener(i,n=function(){t.removeEventListener(i,n,!1),t.readyState="complete"},!1),t.readyState="loading"),r()}(document,"DOMContentLoaded"),e}),function(t,e){"function"==typeof define&&define.amd?define("raphael.svg",["raphael.core"],function(t){return e(t)}):e("object"==typeof exports?require("./raphael.core"):t.Raphael)}(this,function(t){if(!t||t.svg){var e="hasOwnProperty",i=String,n=parseFloat,r=parseInt,o=Math,s=o.max,a=o.abs,l=o.pow,u=/[, ]+/,c=t.eve,h="",d=" ",p="http://www.w3.org/1999/xlink",f={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"},m={};t.toString=function(){return"Your browser supports SVG.\nYou are running Rapha\xebl "+this.version};var g=function(n,r){if(r){"string"==typeof n&&(n=g(n));for(var o in r)r[e](o)&&("xlink:"==o.substring(0,6)?n.setAttributeNS(p,o.substring(6),i(r[o])):n.setAttribute(o,i(r[o])))}else n=t._g.doc.createElementNS("http://www.w3.org/2000/svg",n),n.style&&(n.style.webkitTapHighlightColor="rgba(0,0,0,0)");return n},v=function(e,r){var u="linear",c=e.id+r,d=.5,p=.5,f=e.node,m=e.paper,v=f.style,y=t._g.doc.getElementById(c);if(!y){if(r=i(r).replace(t._radial_gradient,function(t,e,i){if(u="radial",e&&i){d=n(e),p=n(i);var r=2*(p>.5)-1;l(d-.5,2)+l(p-.5,2)>.25&&(p=o.sqrt(.25-l(d-.5,2))*r+.5)&&.5!=p&&(p=p.toFixed(5)-1e-5*r)}return h}),r=r.split(/\s*\-\s*/),"linear"==u){var b=r.shift();if(b=-n(b),isNaN(b))return null;var _=[0,0,o.cos(t.rad(b)),o.sin(t.rad(b))],w=1/(s(a(_[2]),a(_[3]))||1);_[2]*=w,_[3]*=w,_[2]<0&&(_[0]=-_[2],_[2]=0),_[3]<0&&(_[1]=-_[3],_[3]=0)}var x=t._parseDots(r);if(!x)return null;if(c=c.replace(/[\(\)\s,\xb0#]/g,"_"),e.gradient&&c!=e.gradient.id&&(m.defs.removeChild(e.gradient),delete e.gradient),!e.gradient){y=g(u+"Gradient",{id:c}),e.gradient=y,g(y,"radial"==u?{fx:d,fy:p}:{x1:_[0],y1:_[1],x2:_[2],y2:_[3],gradientTransform:e.matrix.invert()}),m.defs.appendChild(y);for(var k=0,C=x.length;C>k;k++)y.appendChild(g("stop",{offset:x[k].offset?x[k].offset:k?"100%":"0%","stop-color":x[k].color||"#fff","stop-opacity":isFinite(x[k].opacity)?x[k].opacity:1}))}}return g(f,{fill:"url('"+document.location.origin+document.location.pathname+"#"+c+"')",opacity:1,"fill-opacity":1}),v.fill=h,v.opacity=1,v.fillOpacity=1,1},y=function(t){var e=t.getBBox(1);g(t.pattern,{patternTransform:t.matrix.invert()+" translate("+e.x+","+e.y+")"})},b=function(n,r,o){if("path"==n.type){for(var s,a,l,u,c,d=i(r).toLowerCase().split("-"),p=n.paper,v=o?"end":"start",y=n.node,b=n.attrs,_=b["stroke-width"],w=d.length,x="classic",k=3,C=3,M=5;w--;)switch(d[w]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":x=d[w];break;case"wide":C=5;break;case"narrow":C=2;break;case"long":k=5;break;case"short":k=2}if("open"==x?(k+=2,C+=2,M+=2,l=1,u=o?4:1,c={fill:"none",stroke:b.stroke}):(u=l=k/2,c={fill:b.stroke,stroke:"none"}),n._.arrows?o?(n._.arrows.endPath&&m[n._.arrows.endPath]--,n._.arrows.endMarker&&m[n._.arrows.endMarker]--):(n._.arrows.startPath&&m[n._.arrows.startPath]--,n._.arrows.startMarker&&m[n._.arrows.startMarker]--):n._.arrows={},"none"!=x){var T="raphael-marker-"+x,S="raphael-marker-"+v+x+k+C+"-obj"+n.id;t._g.doc.getElementById(T)?m[T]++:(p.defs.appendChild(g(g("path"),{"stroke-linecap":"round",d:f[x],id:T})),m[T]=1);var D,L=t._g.doc.getElementById(S);L?(m[S]++,D=L.getElementsByTagName("use")[0]):(L=g(g("marker"),{id:S,markerHeight:C,markerWidth:k,orient:"auto",refX:u,refY:C/2}),D=g(g("use"),{"xlink:href":"#"+T,transform:(o?"rotate(180 "+k/2+" "+C/2+") ":h)+"scale("+k/M+","+C/M+")","stroke-width":(1/((k/M+C/M)/2)).toFixed(4)}),L.appendChild(D),p.defs.appendChild(L),m[S]=1),g(D,c);var A=l*("diamond"!=x&&"oval"!=x);o?(s=n._.arrows.startdx*_||0,a=t.getTotalLength(b.path)-A*_):(s=A*_,a=t.getTotalLength(b.path)-(n._.arrows.enddx*_||0)),c={},c["marker-"+v]="url(#"+S+")",(a||s)&&(c.d=t.getSubpath(b.path,s,a)),g(y,c),n._.arrows[v+"Path"]=T,n._.arrows[v+"Marker"]=S,n._.arrows[v+"dx"]=A,n._.arrows[v+"Type"]=x,n._.arrows[v+"String"]=r}else o?(s=n._.arrows.startdx*_||0,a=t.getTotalLength(b.path)-s):(s=0,a=t.getTotalLength(b.path)-(n._.arrows.enddx*_||0)),n._.arrows[v+"Path"]&&g(y,{d:t.getSubpath(b.path,s,a)}),delete n._.arrows[v+"Path"],delete n._.arrows[v+"Marker"],delete n._.arrows[v+"dx"],delete n._.arrows[v+"Type"],delete n._.arrows[v+"String"];for(c in m)if(m[e](c)&&!m[c]){var E=t._g.doc.getElementById(c);E&&E.parentNode.removeChild(E)}}},_={"-":[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]},w=function(t,e,n){if(e=_[i(e).toLowerCase()]){for(var r=t.attrs["stroke-width"]||"1",o={round:r,square:r,butt:0}[t.attrs["stroke-linecap"]||n["stroke-linecap"]]||0,s=[],a=e.length;a--;)s[a]=e[a]*r+(a%2?1:-1)*o;g(t.node,{"stroke-dasharray":s.join(",")})}else g(t.node,{"stroke-dasharray":"none"})},x=function(n,o){var l=n.node,c=n.attrs,d=l.style.visibility;l.style.visibility="hidden";for(var f in o)if(o[e](f)){if(!t._availableAttrs[e](f))continue;var m=o[f];switch(c[f]=m,f){case"blur":n.blur(m);break;case"title":var _=l.getElementsByTagName("title");if(_.length&&(_=_[0]))_.firstChild.nodeValue=m;else{_=g("title");var x=t._g.doc.createTextNode(m);_.appendChild(x),l.appendChild(_)}break;case"href":case"target":var k=l.parentNode;if("a"!=k.tagName.toLowerCase()){var M=g("a");k.insertBefore(M,l),M.appendChild(l),k=M}"target"==f?k.setAttributeNS(p,"show","blank"==m?"new":m):k.setAttributeNS(p,f,m);break;case"cursor":l.style.cursor=m;break;case"transform":n.transform(m);break;case"arrow-start":b(n,m);break;case"arrow-end":b(n,m,1);break;case"clip-rect":var T=i(m).split(u);if(4==T.length){n.clip&&n.clip.parentNode.parentNode.removeChild(n.clip.parentNode);var S=g("clipPath"),D=g("rect");S.id=t.createUUID(),g(D,{x:T[0],y:T[1],width:T[2],height:T[3]}),S.appendChild(D),n.paper.defs.appendChild(S),g(l,{"clip-path":"url(#"+S.id+")"}),n.clip=D}if(!m){var L=l.getAttribute("clip-path");if(L){var A=t._g.doc.getElementById(L.replace(/(^url\(#|\)$)/g,h));A&&A.parentNode.removeChild(A),g(l,{"clip-path":h}),delete n.clip}}break;case"path":"path"==n.type&&(g(l,{d:m?c.path=t._pathToAbsolute(m):"M0,0"}),n._.dirty=1,n._.arrows&&("startString"in n._.arrows&&b(n,n._.arrows.startString),"endString"in n._.arrows&&b(n,n._.arrows.endString,1)));break;case"width":if(l.setAttribute(f,m),n._.dirty=1,!c.fx)break;f="x",m=c.x;case"x":c.fx&&(m=-c.x-(c.width||0));case"rx":if("rx"==f&&"rect"==n.type)break;case"cx":l.setAttribute(f,m),n.pattern&&y(n),n._.dirty=1;break;case"height":if(l.setAttribute(f,m),n._.dirty=1,!c.fy)break;f="y",m=c.y;case"y":c.fy&&(m=-c.y-(c.height||0));case"ry":if("ry"==f&&"rect"==n.type)break;case"cy":l.setAttribute(f,m),n.pattern&&y(n),n._.dirty=1;break;case"r":"rect"==n.type?g(l,{rx:m,ry:m}):l.setAttribute(f,m),n._.dirty=1;break;case"src":"image"==n.type&&l.setAttributeNS(p,"href",m);break;case"stroke-width":(1!=n._.sx||1!=n._.sy)&&(m/=s(a(n._.sx),a(n._.sy))||1),l.setAttribute(f,m),c["stroke-dasharray"]&&w(n,c["stroke-dasharray"],o),n._.arrows&&("startString"in n._.arrows&&b(n,n._.arrows.startString),"endString"in n._.arrows&&b(n,n._.arrows.endString,1));break;case"stroke-dasharray":w(n,m,o);break;case"fill":var E=i(m).match(t._ISURL);if(E){S=g("pattern");var I=g("image");S.id=t.createUUID(),g(S,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1}),g(I,{x:0,y:0,"xlink:href":E[1]}),S.appendChild(I),function(e){t._preload(E[1],function(){var t=this.offsetWidth,i=this.offsetHeight;g(e,{width:t,height:i}),g(I,{width:t,height:i})})}(S),n.paper.defs.appendChild(S),g(l,{fill:"url(#"+S.id+")"}),n.pattern=S,n.pattern&&y(n);break}var P=t.getRGB(m);if(P.error){if(("circle"==n.type||"ellipse"==n.type||"r"!=i(m).charAt())&&v(n,m)){if("opacity"in c||"fill-opacity"in c){var O=t._g.doc.getElementById(l.getAttribute("fill").replace(/^url\(#|\)$/g,h));if(O){var j=O.getElementsByTagName("stop");g(j[j.length-1],{"stop-opacity":("opacity"in c?c.opacity:1)*("fill-opacity"in c?c["fill-opacity"]:1)})}}c.gradient=m,c.fill="none";break}}else delete o.gradient,delete c.gradient,!t.is(c.opacity,"undefined")&&t.is(o.opacity,"undefined")&&g(l,{opacity:c.opacity}),!t.is(c["fill-opacity"],"undefined")&&t.is(o["fill-opacity"],"undefined")&&g(l,{"fill-opacity":c["fill-opacity"]});P[e]("opacity")&&g(l,{"fill-opacity":P.opacity>1?P.opacity/100:P.opacity});case"stroke":P=t.getRGB(m),l.setAttribute(f,P.hex),"stroke"==f&&P[e]("opacity")&&g(l,{"stroke-opacity":P.opacity>1?P.opacity/100:P.opacity}),"stroke"==f&&n._.arrows&&("startString"in n._.arrows&&b(n,n._.arrows.startString),"endString"in n._.arrows&&b(n,n._.arrows.endString,1));break;case"gradient":("circle"==n.type||"ellipse"==n.type||"r"!=i(m).charAt())&&v(n,m);break;case"opacity":c.gradient&&!c[e]("stroke-opacity")&&g(l,{"stroke-opacity":m>1?m/100:m});case"fill-opacity":if(c.gradient){O=t._g.doc.getElementById(l.getAttribute("fill").replace(/^url\(#|\)$/g,h)),O&&(j=O.getElementsByTagName("stop"),g(j[j.length-1],{"stop-opacity":m}));break}default:"font-size"==f&&(m=r(m,10)+"px");var N=f.replace(/(\-.)/g,function(t){return t.substring(1).toUpperCase()});l.style[N]=m,n._.dirty=1,l.setAttribute(f,m)}}C(n,o),l.style.visibility=d},k=1.2,C=function(n,o){if("text"==n.type&&(o[e]("text")||o[e]("font")||o[e]("font-size")||o[e]("x")||o[e]("y"))){var s=n.attrs,a=n.node,l=a.firstChild?r(t._g.doc.defaultView.getComputedStyle(a.firstChild,h).getPropertyValue("font-size"),10):10;if(o[e]("text")){for(s.text=o.text;a.firstChild;)a.removeChild(a.firstChild);for(var u,c=i(o.text).split("\n"),d=[],p=0,f=c.length;f>p;p++)u=g("tspan"),p&&g(u,{dy:l*k,x:s.x}),u.appendChild(t._g.doc.createTextNode(c[p])),a.appendChild(u),d[p]=u}else for(d=a.getElementsByTagName("tspan"),p=0,f=d.length;f>p;p++)p?g(d[p],{dy:l*k,x:s.x}):g(d[0],{dy:0});g(a,{x:s.x,y:s.y}),n._.dirty=1;var m=n._getBBox(),v=s.y-(m.y+m.height/2);v&&t.is(v,"finite")&&g(d[0],{dy:v})}},M=function(t){return t.parentNode&&"a"===t.parentNode.tagName.toLowerCase()?t.parentNode:t},T=function(e,i){this[0]=this.node=e,e.raphael=!0,this.id=t._oid++,e.raphaelid=this.id,this.matrix=t.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},S=t.el;T.prototype=S,S.constructor=T,t._engine.path=function(t,e){var i=g("path");e.canvas&&e.canvas.appendChild(i);var n=new T(i,e);return n.type="path",x(n,{fill:"none",stroke:"#000",path:t}),n},S.rotate=function(t,e,r){if(this.removed)return this;if(t=i(t).split(u),t.length-1&&(e=n(t[1]),r=n(t[2])),t=n(t[0]),null==r&&(e=r),null==e||null==r){var o=this.getBBox(1);e=o.x+o.width/2,r=o.y+o.height/2}return this.transform(this._.transform.concat([["r",t,e,r]])),this},S.scale=function(t,e,r,o){if(this.removed)return this;if(t=i(t).split(u),t.length-1&&(e=n(t[1]),r=n(t[2]),o=n(t[3])),t=n(t[0]),null==e&&(e=t),null==o&&(r=o),null==r||null==o)var s=this.getBBox(1);return r=null==r?s.x+s.width/2:r,o=null==o?s.y+s.height/2:o,this.transform(this._.transform.concat([["s",t,e,r,o]])),this},S.translate=function(t,e){return this.removed?this:(t=i(t).split(u),t.length-1&&(e=n(t[1])),t=n(t[0])||0,e=+e||0,this.transform(this._.transform.concat([["t",t,e]])),this)},S.transform=function(i){var n=this._;if(null==i)return n.transform;if(t._extractTransform(this,i),this.clip&&g(this.clip,{transform:this.matrix.invert()}),this.pattern&&y(this),this.node&&g(this.node,{transform:this.matrix}),1!=n.sx||1!=n.sy){var r=this.attrs[e]("stroke-width")?this.attrs["stroke-width"]:1;this.attr({"stroke-width":r})}return n.transform=this.matrix.toTransformString(),this},S.hide=function(){return this.removed||(this.node.style.display="none"),this},S.show=function(){return this.removed||(this.node.style.display=""),this},S.remove=function(){var e=M(this.node);if(!this.removed&&e.parentNode){var i=this.paper;i.__set__&&i.__set__.exclude(this),c.unbind("raphael.*.*."+this.id),this.gradient&&i.defs.removeChild(this.gradient),t._tear(this,i),e.parentNode.removeChild(e),this.removeData();for(var n in this)this[n]="function"==typeof this[n]?t._removedFactory(n):null;this.removed=!0}},S._getBBox=function(){if("none"==this.node.style.display){this.show();var t=!0}var e,i=!1;this.paper.canvas.parentElement?e=this.paper.canvas.parentElement.style:this.paper.canvas.parentNode&&(e=this.paper.canvas.parentNode.style),e&&"none"==e.display&&(i=!0,e.display="");var n={};try{n=this.node.getBBox()}catch(t){n={x:this.node.clientLeft,y:this.node.clientTop,width:this.node.clientWidth,height:this.node.clientHeight}}finally{n=n||{},i&&(e.display="none")}return t&&this.hide(),n},S.attr=function(i,n){if(this.removed)return this;if(null==i){var r={};for(var o in this.attrs)this.attrs[e](o)&&(r[o]=this.attrs[o]);return r.gradient&&"none"==r.fill&&(r.fill=r.gradient)&&delete r.gradient,r.transform=this._.transform,r}if(null==n&&t.is(i,"string")){if("fill"==i&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;if("transform"==i)return this._.transform;for(var s=i.split(u),a={},l=0,h=s.length;h>l;l++)i=s[l],i in this.attrs?a[i]=this.attrs[i]:t.is(this.paper.customAttributes[i],"function")?a[i]=this.paper.customAttributes[i].def:a[i]=t._availableAttrs[i];return h-1?a:a[s[0]]}if(null==n&&t.is(i,"array")){for(a={},l=0,h=i.length;h>l;l++)a[i[l]]=this.attr(i[l]);return a}if(null!=n){var d={};d[i]=n}else null!=i&&t.is(i,"object")&&(d=i);for(var p in d)c("raphael.attr."+p+"."+this.id,this,d[p]);for(p in this.paper.customAttributes)if(this.paper.customAttributes[e](p)&&d[e](p)&&t.is(this.paper.customAttributes[p],"function")){var f=this.paper.customAttributes[p].apply(this,[].concat(d[p]));this.attrs[p]=d[p];for(var m in f)f[e](m)&&(d[m]=f[m])}return x(this,d),this},S.toFront=function(){if(this.removed)return this;var e=M(this.node);e.parentNode.appendChild(e);var i=this.paper;return i.top!=this&&t._tofront(this,i),this},S.toBack=function(){if(this.removed)return this;var e=M(this.node),i=e.parentNode;return i.insertBefore(e,i.firstChild),t._toback(this,this.paper),this.paper,this},S.insertAfter=function(e){if(this.removed||!e)return this;var i=M(this.node),n=M(e.node||e[e.length-1].node);return n.nextSibling?n.parentNode.insertBefore(i,n.nextSibling):n.parentNode.appendChild(i),t._insertafter(this,e,this.paper),this},S.insertBefore=function(e){if(this.removed||!e)return this;var i=M(this.node),n=M(e.node||e[0].node);return n.parentNode.insertBefore(i,n),t._insertbefore(this,e,this.paper),this},S.blur=function(e){var i=this;if(0!==+e){var n=g("filter"),r=g("feGaussianBlur");i.attrs.blur=e,n.id=t.createUUID(),g(r,{stdDeviation:+e||1.5}),n.appendChild(r),i.paper.defs.appendChild(n),i._blur=n,g(i.node,{filter:"url(#"+n.id+")"})}else i._blur&&(i._blur.parentNode.removeChild(i._blur),delete i._blur,delete i.attrs.blur),i.node.removeAttribute("filter");return i},t._engine.circle=function(t,e,i,n){var r=g("circle");t.canvas&&t.canvas.appendChild(r);var o=new T(r,t);return o.attrs={cx:e,cy:i,r:n,fill:"none",stroke:"#000"},o.type="circle",g(r,o.attrs),o},t._engine.rect=function(t,e,i,n,r,o){var s=g("rect");t.canvas&&t.canvas.appendChild(s);var a=new T(s,t);return a.attrs={x:e,y:i,width:n,height:r,rx:o||0,ry:o||0,fill:"none",stroke:"#000"},a.type="rect",g(s,a.attrs),a},t._engine.ellipse=function(t,e,i,n,r){var o=g("ellipse");t.canvas&&t.canvas.appendChild(o);var s=new T(o,t);return s.attrs={cx:e,cy:i,rx:n,ry:r,fill:"none",stroke:"#000"},s.type="ellipse",g(o,s.attrs),s},t._engine.image=function(t,e,i,n,r,o){var s=g("image");g(s,{x:i,y:n,width:r,height:o,preserveAspectRatio:"none"}),s.setAttributeNS(p,"href",e),t.canvas&&t.canvas.appendChild(s);var a=new T(s,t);return a.attrs={x:i,y:n,width:r,height:o,src:e},a.type="image",a},t._engine.text=function(e,i,n,r){var o=g("text");e.canvas&&e.canvas.appendChild(o);var s=new T(o,e);return s.attrs={x:i,y:n,"text-anchor":"middle",text:r,"font-family":t._availableAttrs["font-family"],"font-size":t._availableAttrs["font-size"],stroke:"none",fill:"#000"},s.type="text",x(s,s.attrs),s},t._engine.setSize=function(t,e){return this.width=t||this.width,this.height=e||this.height,this.canvas.setAttribute("width",this.width),this.canvas.setAttribute("height",this.height),this._viewBox&&this.setViewBox.apply(this,this._viewBox),this},t._engine.create=function(){var e=t._getContainer.apply(0,arguments),i=e&&e.container,n=e.x,r=e.y,o=e.width,s=e.height;if(!i)throw new Error("SVG container not found.");var a,l=g("svg"),u="overflow:hidden;";return n=n||0,r=r||0,o=o||512,s=s||342,g(l,{height:s,version:1.1,width:o,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}),1==i?(l.style.cssText=u+"position:absolute;left:"+n+"px;top:"+r+"px",t._g.doc.body.appendChild(l),a=1):(l.style.cssText=u+"position:relative",i.firstChild?i.insertBefore(l,i.firstChild):i.appendChild(l)),i=new t._Paper,i.width=o,i.height=s,i.canvas=l,i.clear(),i._left=i._top=0,a&&(i.renderfix=function(){}),i.renderfix(),i},t._engine.setViewBox=function(t,e,i,n,r){c("raphael.setViewBox",this,this._viewBox,[t,e,i,n,r]);var o,a,l=this.getSize(),u=s(i/l.width,n/l.height),h=this.top,p=r?"xMidYMid meet":"xMinYMin";for(null==t?(this._vbSize&&(u=1),delete this._vbSize,o="0 0 "+this.width+d+this.height):(this._vbSize=u,o=t+d+e+d+i+d+n),g(this.canvas,{viewBox:o,preserveAspectRatio:p});u&&h;)a="stroke-width"in h.attrs?h.attrs["stroke-width"]:1,h.attr({"stroke-width":a}),h._.dirty=1,h._.dirtyT=1,h=h.prev;return this._viewBox=[t,e,i,n,!!r],this},t.prototype.renderfix=function(){var t,e=this.canvas,i=e.style;
try{t=e.getScreenCTM()||e.createSVGMatrix()}catch(i){t=e.createSVGMatrix()}var n=-t.e%1,r=-t.f%1;(n||r)&&(n&&(this._left=(this._left+n)%1,i.left=this._left+"px"),r&&(this._top=(this._top+r)%1,i.top=this._top+"px"))},t.prototype.clear=function(){t.eve("raphael.clear",this);for(var e=this.canvas;e.firstChild;)e.removeChild(e.firstChild);this.bottom=this.top=null,(this.desc=g("desc")).appendChild(t._g.doc.createTextNode("Created with Rapha\xebl "+t.version)),e.appendChild(this.desc),e.appendChild(this.defs=g("defs"))},t.prototype.remove=function(){c("raphael.remove",this),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas);for(var e in this)this[e]="function"==typeof this[e]?t._removedFactory(e):null};var D=t.st;for(var L in S)S[e](L)&&!D[e](L)&&(D[L]=function(t){return function(){var e=arguments;return this.forEach(function(i){i[t].apply(i,e)})}}(L))}}),function(t,e){"function"==typeof define&&define.amd?define("raphael.vml",["raphael.core"],function(t){return e(t)}):e("object"==typeof exports?require("./raphael.core"):t.Raphael)}(this,function(t){if(!t||t.vml){var e="hasOwnProperty",i=String,n=parseFloat,r=Math,o=r.round,s=r.max,a=r.min,l=r.abs,u="fill",c=/[, ]+/,h=t.eve,d=" progid:DXImageTransform.Microsoft",p=" ",f="",m={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},g=/([clmz]),?([^clmz]*)/gi,v=/ progid:\S+Blur\([^\)]+\)/g,y=/-?[^,\s-]+/g,b="position:absolute;left:0;top:0;width:1px;height:1px;behavior:url(#default#VML)",_=21600,w={path:1,rect:1,image:1},x={circle:1,ellipse:1},k=function(e){var n=/[ahqstv]/gi,r=t._pathToAbsolute;if(i(e).match(n)&&(r=t._path2curve),n=/[clmz]/g,r==t._pathToAbsolute&&!i(e).match(n)){var s=i(e).replace(g,function(t,e,i){var n=[],r="m"==e.toLowerCase(),s=m[e];return i.replace(y,function(t){r&&2==n.length&&(s+=n+m["m"==e?"l":"L"],n=[]),n.push(o(t*_))}),s+n});return s}var a,l,u=r(e);s=[];for(var c=0,h=u.length;h>c;c++){a=u[c],l=u[c][0].toLowerCase(),"z"==l&&(l="x");for(var d=1,v=a.length;v>d;d++)l+=o(a[d]*_)+(d!=v-1?",":f);s.push(l)}return s.join(p)},C=function(e,i,n){var r=t.matrix();return r.rotate(-e,.5,.5),{dx:r.x(i,n),dy:r.y(i,n)}},M=function(t,e,i,n,r,o){var s=t._,a=t.matrix,c=s.fillpos,h=t.node,d=h.style,f=1,m="",g=_/e,v=_/i;if(d.visibility="hidden",e&&i){if(h.coordsize=l(g)+p+l(v),d.rotation=o*(0>e*i?-1:1),o){var y=C(o,n,r);n=y.dx,r=y.dy}if(0>e&&(m+="x"),0>i&&(m+=" y")&&(f=-1),d.flip=m,h.coordorigin=n*-g+p+r*-v,c||s.fillsize){var b=h.getElementsByTagName(u);b=b&&b[0],h.removeChild(b),c&&(y=C(o,a.x(c[0],c[1]),a.y(c[0],c[1])),b.position=y.dx*f+p+y.dy*f),s.fillsize&&(b.size=s.fillsize[0]*l(e)+p+s.fillsize[1]*l(i)),h.appendChild(b)}d.visibility="visible"}};t.toString=function(){return"Your browser doesn\u2019t support SVG. Falling down to VML.\nYou are running Rapha\xebl "+this.version};var T=function(t,e,n){for(var r=i(e).toLowerCase().split("-"),o=n?"end":"start",s=r.length,a="classic",l="medium",u="medium";s--;)switch(r[s]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":a=r[s];break;case"wide":case"narrow":u=r[s];break;case"long":case"short":l=r[s]}var c=t.node.getElementsByTagName("stroke")[0];c[o+"arrow"]=a,c[o+"arrowlength"]=l,c[o+"arrowwidth"]=u},S=function(r,l){r.attrs=r.attrs||{};var h=r.node,d=r.attrs,m=h.style,g=w[r.type]&&(l.x!=d.x||l.y!=d.y||l.width!=d.width||l.height!=d.height||l.cx!=d.cx||l.cy!=d.cy||l.rx!=d.rx||l.ry!=d.ry||l.r!=d.r),v=x[r.type]&&(d.cx!=l.cx||d.cy!=l.cy||d.r!=l.r||d.rx!=l.rx||d.ry!=l.ry),y=r;for(var b in l)l[e](b)&&(d[b]=l[b]);if(g&&(d.path=t._getPath[r.type](r),r._.dirty=1),l.href&&(h.href=l.href),l.title&&(h.title=l.title),l.target&&(h.target=l.target),l.cursor&&(m.cursor=l.cursor),"blur"in l&&r.blur(l.blur),(l.path&&"path"==r.type||g)&&(h.path=k(~i(d.path).toLowerCase().indexOf("r")?t._pathToAbsolute(d.path):d.path),r._.dirty=1,"image"==r.type&&(r._.fillpos=[d.x,d.y],r._.fillsize=[d.width,d.height],M(r,1,1,0,0,0))),"transform"in l&&r.transform(l.transform),v){var C=+d.cx,S=+d.cy,L=+d.rx||+d.r||0,A=+d.ry||+d.r||0;h.path=t.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x",o((C-L)*_),o((S-A)*_),o((C+L)*_),o((S+A)*_),o(C*_)),r._.dirty=1}if("clip-rect"in l){var I=i(l["clip-rect"]).split(c);if(4==I.length){I[2]=+I[2]+ +I[0],I[3]=+I[3]+ +I[1];var P=h.clipRect||t._g.doc.createElement("div"),O=P.style;O.clip=t.format("rect({1}px {2}px {3}px {0}px)",I),h.clipRect||(O.position="absolute",O.top=0,O.left=0,O.width=r.paper.width+"px",O.height=r.paper.height+"px",h.parentNode.insertBefore(P,h),P.appendChild(h),h.clipRect=P)}l["clip-rect"]||h.clipRect&&(h.clipRect.style.clip="auto")}if(r.textpath){var j=r.textpath.style;l.font&&(j.font=l.font),l["font-family"]&&(j.fontFamily='"'+l["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,f)+'"'),l["font-size"]&&(j.fontSize=l["font-size"]),l["font-weight"]&&(j.fontWeight=l["font-weight"]),l["font-style"]&&(j.fontStyle=l["font-style"])}if("arrow-start"in l&&T(y,l["arrow-start"]),"arrow-end"in l&&T(y,l["arrow-end"],1),null!=l.opacity||null!=l["stroke-width"]||null!=l.fill||null!=l.src||null!=l.stroke||null!=l["stroke-width"]||null!=l["stroke-opacity"]||null!=l["fill-opacity"]||null!=l["stroke-dasharray"]||null!=l["stroke-miterlimit"]||null!=l["stroke-linejoin"]||null!=l["stroke-linecap"]){var N=h.getElementsByTagName(u),Y=!1;if(N=N&&N[0],!N&&(Y=N=E(u)),"image"==r.type&&l.src&&(N.src=l.src),l.fill&&(N.on=!0),(null==N.on||"none"==l.fill||null===l.fill)&&(N.on=!1),N.on&&l.fill){var H=i(l.fill).match(t._ISURL);if(H){N.parentNode==h&&h.removeChild(N),N.rotate=!0,N.src=H[1],N.type="tile";var F=r.getBBox(1);N.position=F.x+p+F.y,r._.fillpos=[F.x,F.y],t._preload(H[1],function(){r._.fillsize=[this.offsetWidth,this.offsetHeight]})}else N.color=t.getRGB(l.fill).hex,N.src=f,N.type="solid",t.getRGB(l.fill).error&&(y.type in{circle:1,ellipse:1}||"r"!=i(l.fill).charAt())&&D(y,l.fill,N)&&(d.fill="none",d.gradient=l.fill,N.rotate=!1)}if("fill-opacity"in l||"opacity"in l){var R=((+d["fill-opacity"]+1||2)-1)*((+d.opacity+1||2)-1)*((+t.getRGB(l.fill).o+1||2)-1);R=a(s(R,0),1),N.opacity=R,N.src&&(N.color="none")}h.appendChild(N);var W=h.getElementsByTagName("stroke")&&h.getElementsByTagName("stroke")[0],z=!1;!W&&(z=W=E("stroke")),(l.stroke&&"none"!=l.stroke||l["stroke-width"]||null!=l["stroke-opacity"]||l["stroke-dasharray"]||l["stroke-miterlimit"]||l["stroke-linejoin"]||l["stroke-linecap"])&&(W.on=!0),("none"==l.stroke||null===l.stroke||null==W.on||0==l.stroke||0==l["stroke-width"])&&(W.on=!1);var B=t.getRGB(l.stroke);W.on&&l.stroke&&(W.color=B.hex),R=((+d["stroke-opacity"]+1||2)-1)*((+d.opacity+1||2)-1)*((+B.o+1||2)-1);var $=.75*(n(l["stroke-width"])||1);if(R=a(s(R,0),1),null==l["stroke-width"]&&($=d["stroke-width"]),l["stroke-width"]&&(W.weight=$),$&&1>$&&(R*=$)&&(W.weight=1),W.opacity=R,l["stroke-linejoin"]&&(W.joinstyle=l["stroke-linejoin"]||"miter"),W.miterlimit=l["stroke-miterlimit"]||8,l["stroke-linecap"]&&(W.endcap="butt"==l["stroke-linecap"]?"flat":"square"==l["stroke-linecap"]?"square":"round"),"stroke-dasharray"in l){var q={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};W.dashstyle=q[e](l["stroke-dasharray"])?q[l["stroke-dasharray"]]:f}z&&h.appendChild(W)}if("text"==y.type){y.paper.canvas.style.display=f;var U=y.paper.span,V=100,G=d.font&&d.font.match(/\d+(?:\.\d*)?(?=px)/);m=U.style,d.font&&(m.font=d.font),d["font-family"]&&(m.fontFamily=d["font-family"]),d["font-weight"]&&(m.fontWeight=d["font-weight"]),d["font-style"]&&(m.fontStyle=d["font-style"]),G=n(d["font-size"]||G&&G[0])||10,m.fontSize=G*V+"px",y.textpath.string&&(U.innerHTML=i(y.textpath.string).replace(/</g,"&#60;").replace(/&/g,"&#38;").replace(/\n/g,"<br>"));var X=U.getBoundingClientRect();y.W=d.w=(X.right-X.left)/V,y.H=d.h=(X.bottom-X.top)/V,y.X=d.x,y.Y=d.y+y.H/2,("x"in l||"y"in l)&&(y.path.v=t.format("m{0},{1}l{2},{1}",o(d.x*_),o(d.y*_),o(d.x*_)+1));for(var J=["x","y","text","font","font-family","font-weight","font-style","font-size"],K=0,Q=J.length;Q>K;K++)if(J[K]in l){y._.dirty=1;break}switch(d["text-anchor"]){case"start":y.textpath.style["v-text-align"]="left",y.bbx=y.W/2;break;case"end":y.textpath.style["v-text-align"]="right",y.bbx=-y.W/2;break;default:y.textpath.style["v-text-align"]="center",y.bbx=0}y.textpath.style["v-text-kern"]=!0}},D=function(e,o,s){e.attrs=e.attrs||{};var a=(e.attrs,Math.pow),l="linear",u=".5 .5";if(e.attrs.gradient=o,o=i(o).replace(t._radial_gradient,function(t,e,i){return l="radial",e&&i&&(e=n(e),i=n(i),a(e-.5,2)+a(i-.5,2)>.25&&(i=r.sqrt(.25-a(e-.5,2))*(2*(i>.5)-1)+.5),u=e+p+i),f}),o=o.split(/\s*\-\s*/),"linear"==l){var c=o.shift();if(c=-n(c),isNaN(c))return null}var h=t._parseDots(o);if(!h)return null;if(e=e.shape||e.node,h.length){e.removeChild(s),s.on=!0,s.method="none",s.color=h[0].color,s.color2=h[h.length-1].color;for(var d=[],m=0,g=h.length;g>m;m++)h[m].offset&&d.push(h[m].offset+p+h[m].color);s.colors=d.length?d.join():"0% "+s.color,"radial"==l?(s.type="gradientTitle",s.focus="100%",s.focussize="0 0",s.focusposition=u,s.angle=0):(s.type="gradient",s.angle=(270-c)%360),e.appendChild(s)}return 1},L=function(e,i){this[0]=this.node=e,e.raphael=!0,this.id=t._oid++,e.raphaelid=this.id,this.X=0,this.Y=0,this.attrs={},this.paper=i,this.matrix=t.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},A=t.el;L.prototype=A,A.constructor=L,A.transform=function(e){if(null==e)return this._.transform;var n,r=this.paper._viewBoxShift,o=r?"s"+[r.scale,r.scale]+"-1-1t"+[r.dx,r.dy]:f;r&&(n=e=i(e).replace(/\.{3}|\u2026/g,this._.transform||f)),t._extractTransform(this,o+e);var s,a=this.matrix.clone(),l=this.skew,u=this.node,c=~i(this.attrs.fill).indexOf("-"),h=!i(this.attrs.fill).indexOf("url(");if(a.translate(1,1),h||c||"image"==this.type)if(l.matrix="1 0 0 1",l.offset="0 0",s=a.split(),c&&s.noRotation||!s.isSimple){u.style.filter=a.toFilter();var d=this.getBBox(),m=this.getBBox(1),g=d.x-m.x,v=d.y-m.y;u.coordorigin=g*-_+p+v*-_,M(this,1,1,g,v,0)}else u.style.filter=f,M(this,s.scalex,s.scaley,s.dx,s.dy,s.rotate);else u.style.filter=f,l.matrix=i(a),l.offset=a.offset();return null!==n&&(this._.transform=n,t._extractTransform(this,n)),this},A.rotate=function(t,e,r){if(this.removed)return this;if(null!=t){if(t=i(t).split(c),t.length-1&&(e=n(t[1]),r=n(t[2])),t=n(t[0]),null==r&&(e=r),null==e||null==r){var o=this.getBBox(1);e=o.x+o.width/2,r=o.y+o.height/2}return this._.dirtyT=1,this.transform(this._.transform.concat([["r",t,e,r]])),this}},A.translate=function(t,e){return this.removed?this:(t=i(t).split(c),t.length-1&&(e=n(t[1])),t=n(t[0])||0,e=+e||0,this._.bbox&&(this._.bbox.x+=t,this._.bbox.y+=e),this.transform(this._.transform.concat([["t",t,e]])),this)},A.scale=function(t,e,r,o){if(this.removed)return this;if(t=i(t).split(c),t.length-1&&(e=n(t[1]),r=n(t[2]),o=n(t[3]),isNaN(r)&&(r=null),isNaN(o)&&(o=null)),t=n(t[0]),null==e&&(e=t),null==o&&(r=o),null==r||null==o)var s=this.getBBox(1);return r=null==r?s.x+s.width/2:r,o=null==o?s.y+s.height/2:o,this.transform(this._.transform.concat([["s",t,e,r,o]])),this._.dirtyT=1,this},A.hide=function(){return!this.removed&&(this.node.style.display="none"),this},A.show=function(){return!this.removed&&(this.node.style.display=f),this},A.auxGetBBox=t.el.getBBox,A.getBBox=function(){var t=this.auxGetBBox();if(this.paper&&this.paper._viewBoxShift){var e={},i=1/this.paper._viewBoxShift.scale;return e.x=t.x-this.paper._viewBoxShift.dx,e.x*=i,e.y=t.y-this.paper._viewBoxShift.dy,e.y*=i,e.width=t.width*i,e.height=t.height*i,e.x2=e.x+e.width,e.y2=e.y+e.height,e}return t},A._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}},A.remove=function(){if(!this.removed&&this.node.parentNode){this.paper.__set__&&this.paper.__set__.exclude(this),t.eve.unbind("raphael.*.*."+this.id),t._tear(this,this.paper),this.node.parentNode.removeChild(this.node),this.shape&&this.shape.parentNode.removeChild(this.shape);for(var e in this)this[e]="function"==typeof this[e]?t._removedFactory(e):null;this.removed=!0}},A.attr=function(i,n){if(this.removed)return this;if(null==i){var r={};for(var o in this.attrs)this.attrs[e](o)&&(r[o]=this.attrs[o]);return r.gradient&&"none"==r.fill&&(r.fill=r.gradient)&&delete r.gradient,r.transform=this._.transform,r}if(null==n&&t.is(i,"string")){if(i==u&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;for(var s=i.split(c),a={},l=0,d=s.length;d>l;l++)i=s[l],i in this.attrs?a[i]=this.attrs[i]:t.is(this.paper.customAttributes[i],"function")?a[i]=this.paper.customAttributes[i].def:a[i]=t._availableAttrs[i];return d-1?a:a[s[0]]}if(this.attrs&&null==n&&t.is(i,"array")){for(a={},l=0,d=i.length;d>l;l++)a[i[l]]=this.attr(i[l]);return a}var p;null!=n&&(p={},p[i]=n),null==n&&t.is(i,"object")&&(p=i);for(var f in p)h("raphael.attr."+f+"."+this.id,this,p[f]);if(p){for(f in this.paper.customAttributes)if(this.paper.customAttributes[e](f)&&p[e](f)&&t.is(this.paper.customAttributes[f],"function")){var m=this.paper.customAttributes[f].apply(this,[].concat(p[f]));this.attrs[f]=p[f];for(var g in m)m[e](g)&&(p[g]=m[g])}p.text&&"text"==this.type&&(this.textpath.string=p.text),S(this,p)}return this},A.toFront=function(){return!this.removed&&this.node.parentNode.appendChild(this.node),this.paper&&this.paper.top!=this&&t._tofront(this,this.paper),this},A.toBack=function(){return this.removed?this:(this.node.parentNode.firstChild!=this.node&&(this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild),t._toback(this,this.paper)),this)},A.insertAfter=function(e){return this.removed?this:(e.constructor==t.st.constructor&&(e=e[e.length-1]),e.node.nextSibling?e.node.parentNode.insertBefore(this.node,e.node.nextSibling):e.node.parentNode.appendChild(this.node),t._insertafter(this,e,this.paper),this)},A.insertBefore=function(e){return this.removed?this:(e.constructor==t.st.constructor&&(e=e[0]),e.node.parentNode.insertBefore(this.node,e.node),t._insertbefore(this,e,this.paper),this)},A.blur=function(e){var i=this.node.runtimeStyle,n=i.filter;return n=n.replace(v,f),0!==+e?(this.attrs.blur=e,i.filter=n+p+d+".Blur(pixelradius="+(+e||1.5)+")",i.margin=t.format("-{0}px 0 0 -{0}px",o(+e||1.5))):(i.filter=n,i.margin=0,delete this.attrs.blur),this},t._engine.path=function(t,e){var i=E("shape");i.style.cssText=b,i.coordsize=_+p+_,i.coordorigin=e.coordorigin;var n=new L(i,e),r={fill:"none",stroke:"#000"};t&&(r.path=t),n.type="path",n.path=[],n.Path=f,S(n,r),e.canvas.appendChild(i);var o=E("skew");return o.on=!0,i.appendChild(o),n.skew=o,n.transform(f),n},t._engine.rect=function(e,i,n,r,o,s){var a=t._rectPath(i,n,r,o,s),l=e.path(a),u=l.attrs;return l.X=u.x=i,l.Y=u.y=n,l.W=u.width=r,l.H=u.height=o,u.r=s,u.path=a,l.type="rect",l},t._engine.ellipse=function(t,e,i,n,r){var o=t.path();return o.attrs,o.X=e-n,o.Y=i-r,o.W=2*n,o.H=2*r,o.type="ellipse",S(o,{cx:e,cy:i,rx:n,ry:r}),o},t._engine.circle=function(t,e,i,n){var r=t.path();return r.attrs,r.X=e-n,r.Y=i-n,r.W=r.H=2*n,r.type="circle",S(r,{cx:e,cy:i,r:n}),r},t._engine.image=function(e,i,n,r,o,s){var a=t._rectPath(n,r,o,s),l=e.path(a).attr({stroke:"none"}),c=l.attrs,h=l.node,d=h.getElementsByTagName(u)[0];return c.src=i,l.X=c.x=n,l.Y=c.y=r,l.W=c.width=o,l.H=c.height=s,c.path=a,l.type="image",d.parentNode==h&&h.removeChild(d),d.rotate=!0,d.src=i,d.type="tile",l._.fillpos=[n,r],l._.fillsize=[o,s],h.appendChild(d),M(l,1,1,0,0,0),l},t._engine.text=function(e,n,r,s){var a=E("shape"),l=E("path"),u=E("textpath");n=n||0,r=r||0,s=s||"",l.v=t.format("m{0},{1}l{2},{1}",o(n*_),o(r*_),o(n*_)+1),l.textpathok=!0,u.string=i(s),u.on=!0,a.style.cssText=b,a.coordsize=_+p+_,a.coordorigin="0 0";var c=new L(a,e),h={fill:"#000",stroke:"none",font:t._availableAttrs.font,text:s};c.shape=a,c.path=l,c.textpath=u,c.type="text",c.attrs.text=i(s),c.attrs.x=n,c.attrs.y=r,c.attrs.w=1,c.attrs.h=1,S(c,h),a.appendChild(u),a.appendChild(l),e.canvas.appendChild(a);var d=E("skew");return d.on=!0,a.appendChild(d),c.skew=d,c.transform(f),c},t._engine.setSize=function(e,i){var n=this.canvas.style;return this.width=e,this.height=i,e==+e&&(e+="px"),i==+i&&(i+="px"),n.width=e,n.height=i,n.clip="rect(0 "+e+" "+i+" 0)",this._viewBox&&t._engine.setViewBox.apply(this,this._viewBox),this},t._engine.setViewBox=function(e,i,n,r,o){t.eve("raphael.setViewBox",this,this._viewBox,[e,i,n,r,o]);var s,a,l=this.getSize(),u=l.width,c=l.height;return o&&(s=c/r,a=u/n,u>n*s&&(e-=(u-n*s)/2/s),c>r*a&&(i-=(c-r*a)/2/a)),this._viewBox=[e,i,n,r,!!o],this._viewBoxShift={dx:-e,dy:-i,scale:l},this.forEach(function(t){t.transform("...")}),this};var E;t._engine.initWin=function(t){var e=t.document;e.styleSheets.length<31?e.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)"):e.styleSheets[0].addRule(".rvml","behavior:url(#default#VML)");try{!e.namespaces.rvml&&e.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),E=function(t){return e.createElement("<rvml:"+t+' class="rvml">')}}catch(t){E=function(t){return e.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},t._engine.initWin(t._g.win),t._engine.create=function(){var e=t._getContainer.apply(0,arguments),i=e.container,n=e.height,r=e.width,o=e.x,s=e.y;if(!i)throw new Error("VML container not found.");var a=new t._Paper,l=a.canvas=t._g.doc.createElement("div"),u=l.style;return o=o||0,s=s||0,r=r||512,n=n||342,a.width=r,a.height=n,r==+r&&(r+="px"),n==+n&&(n+="px"),a.coordsize=1e3*_+p+1e3*_,a.coordorigin="0 0",a.span=t._g.doc.createElement("span"),a.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",l.appendChild(a.span),u.cssText=t.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",r,n),1==i?(t._g.doc.body.appendChild(l),u.left=o+"px",u.top=s+"px",u.position="absolute"):i.firstChild?i.insertBefore(l,i.firstChild):i.appendChild(l),a.renderfix=function(){},a},t.prototype.clear=function(){t.eve("raphael.clear",this),this.canvas.innerHTML=f,this.span=t._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},t.prototype.remove=function(){t.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas);for(var e in this)this[e]="function"==typeof this[e]?t._removedFactory(e):null;return!0};var I=t.st;for(var P in A)A[e](P)&&!I[e](P)&&(I[P]=function(t){return function(){var e=arguments;return this.forEach(function(i){i[t].apply(i,e)})}}(P))}}),function(t,e){if("function"==typeof define&&define.amd)define("raphael",["raphael.core","raphael.svg","raphael.vml"],function(i){return t.Raphael=e(i)});else if("object"==typeof exports){var i=require("raphael.core");require("raphael.svg"),require("raphael.vml"),module.exports=e(i)}else t.Raphael=e(t.Raphael)}(this,function(t){return t.ninja()}),function(){var t={inheritAttrs:function(t,e){for(var i in e)"function"!=typeof e[i]&&(t[i]instanceof Object&&e[i]instanceof Object?this.inheritAttrs(t[i],e[i]):t[i]=e[i])},createMerge:function(t,e){var i={};return t&&this.inheritAttrs(i,this.cloneObj(t)),e&&this.inheritAttrs(i,e),i},cloneObj:function(t){if(Object(t)!==t)return t;var e=new t.constructor;for(var i in t)t.hasOwnProperty(i)&&(e[i]=this.cloneObj(t[i]));return e},addEvent:function(t,e,i){t.addEventListener?t.addEventListener(e,i,!1):t.attachEvent?t.attachEvent("on"+e,i):t["on"+e]=i},hasClass:function(t,e){return(" "+t.className+" ").replace(/[\n\t]/g," ").indexOf(" "+e+" ")>-1}},e=function(){this.loading=[]};e.prototype={processNode:function(t){for(var e=t.nodeDOM.getElementsByTagName("img"),i=e.length;i--;)this.create(t,e[i])},removeAll:function(t){for(var e=this.loading.length;e--;)this.loading[e]===t&&this.loading.splice(e,1)},create:function(e,i){function n(){r.removeAll(o),e.width=e.nodeDOM.offsetWidth,e.height=e.nodeDOM.offsetHeight}var r=this,o=i.src;return this.loading.push(o),i.complete?n():(t.addEvent(i,"load",n),t.addEvent(i,"error",n),void(i.src+="?"+(new Date).getTime()))},isNotLoading:function(){return 0===this.loading.length}};var i={store:[],createTree:function(t){return this.store.push(new n(t,this.store.length)),this.store[this.store.length-1]},get:function(t){return this.store[t]},destroy:function(t){var e=this.get(t);if(e){e._R.remove();for(var i=e.drawArea;i.firstChild;)i.removeChild(i.firstChild);for(var n=i.className.split(" "),r=[],o=0;o<n.length;o++){var s=n[o];"Treant"!=s&&"Treant-loaded"!=s&&r.push(s)}i.style.overflowY="",i.style.overflowX="",i.className=r.join(" "),this.store[t]=null}}},n=function(i,o){this.id=o,this.imageLoader=new e,this.CONFIG=t.createMerge(n.CONFIG,i.chart),this.drawArea=document.getElementById(this.CONFIG.container.substring(1)),this.drawArea.className+=" Treant",this.nodeDB=new r(i.nodeStructure,this),this.connectionStore={}};n.prototype={positionTree:function(t){var e=this;if(this.imageLoader.isNotLoading()){var i=this.root();this.CONFIG.rootOrientation;this.resetLevelData(),this.firstWalk(i,0),this.secondWalk(i,0,0,0),this.positionNodes(),this.CONFIG.animateOnInit&&setTimeout(function(){i.toggleCollapse()},this.CONFIG.animateOnInitDelay),this.loaded||(this.drawArea.className+=" Treant-loaded","[object Function]"===Object.prototype.toString.call(t)&&t(e),this.loaded=!0)}else setTimeout(function(){e.positionTree(t)},10)},firstWalk:function(t,e){t.prelim=null,t.modifier=null,this.setNeighbors(t,e),this.calcLevelDim(t,e);var i=t.leftSibling();if(0===t.childrenCount()||e==this.CONFIG.maxDepth)i?t.prelim=i.prelim+i.size()+this.CONFIG.siblingSeparation:t.prelim=0;else{for(var n=0,r=t.childrenCount();n<r;n++)this.firstWalk(t.childAt(n),e+1);var o=t.childrenCenter()-t.size()/2;i?(t.prelim=i.prelim+i.size()+this.CONFIG.siblingSeparation,t.modifier=t.prelim-o,this.apportion(t,e)):t.prelim=o,t.stackParent?t.modifier+=this.nodeDB.get(t.stackChildren[0]).size()/2+t.connStyle.stackIndent:t.stackParentId&&(t.prelim=0)}},apportion:function(t,e){for(var i=t.firstChild(),n=i.leftNeighbor(),r=1,o=this.CONFIG.maxDepth-e;i&&n&&r<=o;){for(var s=0,a=0,l=n,u=i,c=0;c<r;c++)l=l.parent(),u=u.parent(),a+=l.modifier,s+=u.modifier,void 0!==u.stackParent&&(s+=u.size()/2);var h=n.prelim+a+n.size()+this.CONFIG.subTeeSeparation-(i.prelim+s);if(h>0){for(var d=t,p=0;d&&d.id!=l.id;)d=d.leftSibling(),p++;if(d)for(var f=t,m=h/p;f.id!=l.id;)f.prelim+=h,f.modifier+=h,h-=m,f=f.leftSibling()}r++,i=0===i.childrenCount()?t.leftMost(0,r):i.firstChild(),i&&(n=i.leftNeighbor())}},secondWalk:function(t,e,i,n){if(e<=this.CONFIG.maxDepth){var r,o,s=t.prelim+i,a=n,l=this.CONFIG.nodeAlign,u=this.CONFIG.rootOrientation;if("NORTH"==u||"SOUTH"==u?(r=this.levelMaxDim[e].height,o=t.height,t.pseudo&&(t.height=r)):"WEST"!=u&&"EAST"!=u||(r=this.levelMaxDim[e].width,o=t.width,t.pseudo&&(t.width=r)),t.X=s,t.pseudo?"NORTH"==u||"WEST"==u?t.Y=a:"SOUTH"!=u&&"EAST"!=u||(t.Y=a+(r-o)):t.Y="CENTER"==l?a+(r-o)/2:"TOP"==l?a+(r-o):a,"WEST"==u||"EAST"==u){var c=t.X;t.X=t.Y,t.Y=c}"SOUTH"==u?t.Y=-t.Y-o:"EAST"==u&&(t.X=-t.X-o),0!==t.childrenCount()&&(0===t.id&&this.CONFIG.hideRootNode?this.secondWalk(t.firstChild(),e+1,i+t.modifier,n):this.secondWalk(t.firstChild(),e+1,i+t.modifier,n+r+this.CONFIG.levelSeparation)),t.rightSibling()&&this.secondWalk(t.rightSibling(),e,i,n)}},positionNodes:function(){var t,e,i,n=this,r={x:n.nodeDB.getMinMaxCoord("X",null,null),y:n.nodeDB.getMinMaxCoord("Y",null,null)},o=r.x.max-r.x.min,s=r.y.max-r.y.min,a={x:r.x.max-o/2,y:r.y.max-s/2},l={x:n.drawArea.clientWidth/2,y:n.drawArea.clientHeight/2},u=l.x-a.x,c=l.y-a.y,h=r.x.min+u<=0?Math.abs(r.x.min):0,d=r.y.min+c<=0?Math.abs(r.y.min):0;for(this.handleOverflow(o,s),t=0,e=this.nodeDB.db.length;t<e;t++)if(i=this.nodeDB.get(t),0!==i.id||!this.CONFIG.hideRootNode){i.X+=h+(o<this.drawArea.clientWidth?u:this.CONFIG.padding),i.Y+=d+(s<this.drawArea.clientHeight?c:this.CONFIG.padding);var p=i.collapsedParent(),f=null;p?(f=p.connectorPoint(!0),i.hide(f)):i.positioned?i.show():(i.nodeDOM.style.left=i.X+"px",i.nodeDOM.style.top=i.Y+"px",i.positioned=!0),0===i.id||0===i.parent().id&&this.CONFIG.hideRootNode?!this.CONFIG.hideRootNode&&i.drawLineThrough&&i.drawLineThroughMe():this.setConnectionToParent(i,f)}},handleOverflow:function(t,e){var i=t<this.drawArea.clientWidth?this.drawArea.clientWidth:t+2*this.CONFIG.padding,n=e<this.drawArea.clientHeight?this.drawArea.clientHeight:e+2*this.CONFIG.padding;if(this._R?this._R.setSize(i,n):this._R=Raphael(this.drawArea,i,n),"native"==this.CONFIG.scrollbar)this.drawArea.clientWidth<t&&(this.drawArea.style.overflowX="auto"),this.drawArea.clientHeight<e&&(this.drawArea.style.overflowY="auto");else if("fancy"==this.CONFIG.scrollbar){var r=$(this.drawArea);if(r.hasClass("ps-container"))r.find(".Treant").css({width:i,height:n}),r.perfectScrollbar("update");else{var o=r.wrapInner('<div class="Treant"/>'),s=o.find(".Treant");s.css({width:i,height:n}),o.perfectScrollbar()}}},setConnectionToParent:function(t,e){var i,n=t.stackParentId,r=n?this.nodeDB.get(n):t.parent(),o=e?this.getPointPathString(e):this.getPathString(r,t,n);this.connectionStore[t.id]?(i=this.connectionStore[t.id],this.animatePath(i,o)):(i=this._R.path(o),this.connectionStore[t.id]=i,t.pseudo&&delete r.connStyle.style["arrow-end"],r.pseudo&&delete r.connStyle.style["arrow-start"],i.attr(r.connStyle.style),(t.drawLineThrough||t.pseudo)&&t.drawLineThroughMe(e))},getPointPathString:function(t){return["_M",t.x,",",t.y,"L",t.x,",",t.y,t.x,",",t.y].join(" ")},animatePath:function(t,e){t.hidden&&"_"!==e.charAt(0)&&(t.show(),t.hidden=!1),t.animate({path:"_"===e.charAt(0)?e.substring(1):e},this.CONFIG.animation.connectorsSpeed,this.CONFIG.animation.connectorsAnimation,function(){"_"===e.charAt(0)&&(t.hide(),t.hidden=!0)})},getPathString:function(t,e,i){var n=t.connectorPoint(!0),r=e.connectorPoint(!1),o=this.CONFIG.rootOrientation,s=t.connStyle.type,a={},l={};"NORTH"==o||"SOUTH"==o?(a.y=l.y=(n.y+r.y)/2,a.x=n.x,l.x=r.x):"EAST"!=o&&"WEST"!=o||(a.x=l.x=(n.x+r.x)/2,a.y=n.y,l.y=r.y);var u,c,h=n.x+","+n.y,d=a.x+","+a.y,p=l.x+","+l.y,f=r.x+","+r.y,m=(a.x+l.x)/2+","+(a.y+l.y)/2;if(i){if(c="EAST"==o||"WEST"==o?r.x+","+n.y:n.x+","+r.y,"step"==s||"straight"==s)u=["M",h,"L",c,"L",f];else if("curve"==s||"bCurve"==s){var g,v=t.connStyle.stackIndent;"NORTH"==o?g=r.x-v+","+(r.y-v):"SOUTH"==o?g=r.x-v+","+(r.y+v):"EAST"==o?g=r.x+v+","+n.y:"WEST"==o&&(g=r.x-v+","+n.y),u=["M",h,"L",g,"S",c,f]}}else"step"==s?u=["M",h,"L",d,"L",p,"L",f]:"curve"==s?u=["M",h,"C",d,p,f]:"bCurve"==s?u=["M",h,"Q",d,m,"T",f]:"straight"==s&&(u=["M",h,"L",h,f]);return u.join(" ")},setNeighbors:function(t,e){t.leftNeighborId=this.lastNodeOnLevel[e],t.leftNeighborId&&(t.leftNeighbor().rightNeighborId=t.id),this.lastNodeOnLevel[e]=t.id},calcLevelDim:function(t,e){this.levelMaxDim[e]?(this.levelMaxDim[e].width<t.width&&(this.levelMaxDim[e].width=t.width),this.levelMaxDim[e].height<t.height&&(this.levelMaxDim[e].height=t.height)):this.levelMaxDim[e]={width:t.width,height:t.height}},resetLevelData:function(){this.lastNodeOnLevel=[],this.levelMaxDim=[]},root:function(){return this.nodeDB.get(0)}};var r=function(e,i){function n(e,o){var s=r.createNode(e,o,i,null);if(e.children){if(s.children=[],e.childrenDropLevel&&e.childrenDropLevel>0)for(;e.childrenDropLevel--;){var a=t.cloneObj(s.connStyle);s=r.createNode("pseudo",s.id,i,null),s.connStyle=a,s.children=[]}var l=e.stackChildren&&!r.hasGrandChildren(e)?s.id:null;null!==l&&(s.stackChildren=[]);for(var u=0,c=e.children.length;u<c;u++)null!==l?(s=r.createNode(e.children[u],s.id,i,l),u+1<c&&(s.children=[])):n(e.children[u],s.id)}}this.db=[];var r=this;i.CONFIG.animateOnInit&&(e.collapsed=!0),n(e,-1),this.createGeometries(i)};r.prototype={createGeometries:function(t){for(var e=this.db.length;e--;)this.get(e).createGeometry(t)},get:function(t){return this.db[t]},createNode:function(t,e,i,n){var r=new o(t,this.db.length,e,i,n);return this.db.push(r),e>=0&&this.get(e).children.push(r.id),n&&(this.get(n).stackParent=!0,this.get(n).stackChildren.push(r.id)),r},getMinMaxCoord:function(t,e,i){for(var e=e||this.get(0),n=e.childrenCount(),i=i||{min:e[t],max:e[t]+("X"==t?e.width:e.height)};n--;){var r=e.childAt(n),o=r[t]+("X"==t?r.width:r.height),s=r[t];o>i.max&&(i.max=o),s<i.min&&(i.min=s),this.getMinMaxCoord(t,r,i)}return i},hasGrandChildren:function(t){for(var e=t.children.length;e--;)if(t.children[e].children)return!0}};var o=function(e,i,n,r,o){this.id=i,this.parentId=n,this.treeId=r.id,this.prelim=0,this.modifier=0,this.stackParentId=o,this.pseudo="pseudo"===e||e.pseudo,this.image=e.image,this.link=t.createMerge(r.CONFIG.node.link,e.link),this.connStyle=t.createMerge(r.CONFIG.connectors,e.connectors),this.drawLineThrough=e.drawLineThrough!==!1&&(e.drawLineThrough||r.CONFIG.node.drawLineThrough),this.collapsable=e.collapsable!==!1&&(e.collapsable||r.CONFIG.node.collapsable),this.collapsed=e.collapsed,this.text=e.text,this.nodeInnerHTML=e.innerHTML,this.nodeHTMLclass=(r.CONFIG.node.HTMLclass?r.CONFIG.node.HTMLclass:"")+(e.HTMLclass?" "+e.HTMLclass:""),this.nodeHTMLid=e.HTMLid};o.prototype={Tree:function(){return i.get(this.treeId)},dbGet:function(t){return this.Tree().nodeDB.get(t)},size:function(){var t=this.Tree().CONFIG.rootOrientation;return this.pseudo?-this.Tree().CONFIG.subTeeSeparation:"NORTH"==t||"SOUTH"==t?this.width:"WEST"==t||"EAST"==t?this.height:void 0},childrenCount:function(){return this.collapsed||!this.children?0:this.children.length},childAt:function(t){return this.dbGet(this.children[t])},firstChild:function(){return this.childAt(0)},lastChild:function(){return this.childAt(this.children.length-1)},parent:function(){return this.dbGet(this.parentId)},leftNeighbor:function(){if(this.leftNeighborId)return this.dbGet(this.leftNeighborId)},rightNeighbor:function(){if(this.rightNeighborId)return this.dbGet(this.rightNeighborId)},leftSibling:function(){var t=this.leftNeighbor();if(t&&t.parentId==this.parentId)return t},rightSibling:function(){var t=this.rightNeighbor();if(t&&t.parentId==this.parentId)return t},childrenCenter:function(){var t=this.firstChild(),e=this.lastChild();return t.prelim+(e.prelim-t.prelim+e.size())/2},collapsedParent:function(){var t=this.parent();return!!t&&(t.collapsed?t:t.collapsedParent())},leftMost:function(t,e){if(t>=e)return this;if(0!==this.childrenCount())for(var i=0,n=this.childrenCount();i<n;i++){var r=this.childAt(i).leftMost(t+1,e);if(r)return r}},connectorPoint:function(t){var e=this.Tree().CONFIG.rootOrientation,i={};return this.stackParentId&&("NORTH"==e||"SOUTH"==e?e="WEST":"EAST"!=e&&"WEST"!=e||(e="NORTH")),"NORTH"==e?(i.x=this.pseudo?this.X-this.Tree().CONFIG.subTeeSeparation/2:this.X+this.width/2,i.y=t?this.Y+this.height:this.Y):"SOUTH"==e?(i.x=this.pseudo?this.X-this.Tree().CONFIG.subTeeSeparation/2:this.X+this.width/2,i.y=t?this.Y:this.Y+this.height):"EAST"==e?(i.x=t?this.X:this.X+this.width,i.y=this.pseudo?this.Y-this.Tree().CONFIG.subTeeSeparation/2:this.Y+this.height/2):"WEST"==e&&(i.x=t?this.X+this.width:this.X,i.y=this.pseudo?this.Y-this.Tree().CONFIG.subTeeSeparation/2:this.Y+this.height/2),i},pathStringThrough:function(){var t=this.connectorPoint(!0),e=this.connectorPoint(!1);return["M",t.x+","+t.y,"L",e.x+","+e.y].join(" ")},drawLineThroughMe:function(e){var i=e?this.Tree().getPointPathString(e):this.pathStringThrough();this.lineThroughMe=this.lineThroughMe||this.Tree()._R.path(i);var n=t.cloneObj(this.connStyle.style);delete n["arrow-start"],delete n["arrow-end"],this.lineThroughMe.attr(n),e&&(this.lineThroughMe.hide(),this.lineThroughMe.hidden=!0)},addSwitchEvent:function(e){var i=this;t.addEvent(e,"click",function(t){t.preventDefault(),i.toggleCollapse()})},toggleCollapse:function(){var t=this.Tree();t.inAnimation||(t.inAnimation=!0,this.collapsed=!this.collapsed,this.collapsed?$(this.nodeDOM).addClass("collapsed"):$(this.nodeDOM).removeClass("collapsed"),t.positionTree(),setTimeout(function(){t.inAnimation=!1},t.CONFIG.animation.nodeSpeed>t.CONFIG.animation.connectorsSpeed?t.CONFIG.animation.nodeSpeed:t.CONFIG.animation.connectorsSpeed))},hide:function(t){this.nodeDOM.style.overflow="hidden";var e=$(this.nodeDOM),i=this.Tree(),n=i.CONFIG,r={left:t.x,top:t.y};if(this.hidden||(r.width=r.height=0),this.startW&&this.startH||(this.startW=e.outerWidth(),this.startH=e.outerHeight()),!this.positioned||this.hidden?(this.nodeDOM.style.visibility="hidden",e.css(r),this.positioned=!0):e.animate(r,n.animation.nodeSpeed,n.animation.nodeAnimation,function(){this.style.visibility="hidden"}),this.lineThroughMe){var o=i.getPointPathString(t);this.hidden?this.lineThroughMe.attr({path:o}):i.animatePath(this.lineThroughMe,i.getPointPathString(t))}this.hidden=!0},show:function(){
this.nodeDOM.style.visibility="visible";var t={left:this.X,top:this.Y},e=this.Tree(),i=e.CONFIG;this.hidden&&(t.width=this.startW,t.height=this.startH),$(this.nodeDOM).animate(t,i.animation.nodeSpeed,i.animation.nodeAnimation,function(){this.style.overflow=""}),this.lineThroughMe&&e.animatePath(this.lineThroughMe,this.pathStringThrough()),this.hidden=!1}},o.prototype.createGeometry=function(t){if(0===this.id&&t.CONFIG.hideRootNode)return this.width=0,void(this.height=0);var e,i=t.drawArea,n=this.link.href?document.createElement("a"):document.createElement("div");if(n.className=this.pseudo?"pseudo":o.CONFIG.nodeHTMLclass,this.nodeHTMLclass&&!this.pseudo&&(n.className+=" "+this.nodeHTMLclass),this.nodeHTMLid&&(n.id=this.nodeHTMLid),this.link.href&&(n.href=this.link.href,n.target=this.link.target),!this.pseudo){if(this.nodeInnerHTML)if("#"===this.nodeInnerHTML.charAt(0)){var r=document.getElementById(this.nodeInnerHTML.substring(1));r?(n=r.cloneNode(!0),n.id+="-clone",n.className+=" node"):n.innerHTML="<b> Wrong ID selector </b>"}else n.innerHTML=this.nodeInnerHTML;else if(this.image&&(e=document.createElement("img"),e.src=this.image,n.appendChild(e)),this.text)for(var s in this.text)if(o.CONFIG.textClass[s]){var a=document.createElement(this.text[s].href?"a":"p");this.text[s].href&&(a.href=this.text[s].href,this.text[s].target&&(a.target=this.text[s].target)),a.className=o.CONFIG.textClass[s],a.appendChild(document.createTextNode(this.text[s].val?this.text[s].val:this.text[s]instanceof Object?"'val' param missing!":this.text[s])),n.appendChild(a)}if(this.collapsed||this.collapsable&&this.childrenCount()&&!this.stackParentId){var l=document.createElement("a");l.className="collapse-switch",n.appendChild(l),this.addSwitchEvent(l),this.collapsed&&(n.className+=" collapsed")}}i.appendChild(n),this.width=n.offsetWidth,this.height=n.offsetHeight,this.nodeDOM=n,t.imageLoader.processNode(this)},n.CONFIG={maxDepth:100,rootOrientation:"NORTH",nodeAlign:"CENTER",levelSeparation:30,siblingSeparation:30,subTeeSeparation:30,hideRootNode:!1,animateOnInit:!1,animateOnInitDelay:500,padding:15,scrollbar:"native",connectors:{type:"curve",style:{stroke:"black"},stackIndent:15},node:{link:{target:"_self"}},animation:{nodeSpeed:450,nodeAnimation:"linear",connectorsSpeed:450,connectorsAnimation:"linear"}},o.CONFIG={nodeHTMLclass:"node",textClass:{name:"node-name",title:"node-title",desc:"node-desc",contact:"node-contact"}};var s={make:function(t){var e,i=t.length;for(this.jsonStructure={chart:null,nodeStructure:null};i--;)e=t[i],e.hasOwnProperty("container")?this.jsonStructure.chart=e:e.hasOwnProperty("parent")||e.hasOwnProperty("container")||(this.jsonStructure.nodeStructure=e,e.myID=this.getID());return this.findChildren(t),this.jsonStructure},findChildren:function(t){for(var e=[0];e.length;){for(var i=e.pop(),n=this.findNode(this.jsonStructure.nodeStructure,i),r=0,o=t.length,s=[];r<o;r++){var a=t[r];a.parent&&a.parent.myID==i&&(a.myID=this.getID(),delete a.parent,s.push(a),e.push(a.myID))}s.length&&(n.children=s)}},findNode:function(t,e){var i,n;if(t.myID===e)return t;if(t.children)for(i=t.children.length;i--;)if(n=this.findNode(t.children[i],e))return n},getID:function(){var t=0;return function(){return t++}}()},a=function(t,e){t instanceof Array&&(t=s.make(t));var n=i.createTree(t);n.positionTree(e),this.tree_id=n.id};a.prototype.destroy=function(){i.destroy(this.tree_id)},window.Treant=a}(),function(t){var e={wheelSpeed:10,wheelPropagation:!1};t.fn.perfectScrollbar=function(i,n){var r=t.extend(!0,{},e);if("object"==typeof i?t.extend(!0,r,i):n=i,"update"===n)return t(this).data("perfect_scrollbar_update")&&t(this).data("perfect_scrollbar_update")(),t(this);if("destroy"===n)return t(this).data("perfect_scrollbar_destroy")&&t(this).data("perfect_scrollbar_destroy")(),t(this);if(t(this).data("perfect_scrollbar"))return t(this).data("perfect_scrollbar");var o,s,a,l,u,c,h,d,p=t(this).addClass("ps-container"),f=t(this).children(),m=t("<div class='ps-scrollbar-x'></div>").appendTo(p),g=t("<div class='ps-scrollbar-y'></div>").appendTo(p),v=parseInt(m.css("bottom"),10),y=parseInt(g.css("right"),10),b=function(){var t=parseInt(d*l/s,10);p.scrollTop(t),m.css({bottom:v-t})},_=function(){var t=parseInt(c*a/o,10);p.scrollLeft(t),g.css({right:y-t})},w=function(){o=p.width(),s=p.height(),a=f.outerWidth(!1),l=f.outerHeight(!1),o<a?(u=parseInt(o*o/a,10),c=parseInt(p.scrollLeft()*o/a,10)):(u=0,c=0,p.scrollLeft(0)),s<l?(h=parseInt(s*s/l,10),d=parseInt(p.scrollTop()*s/l,10)):(h=0,scrollbar_y_left=0,p.scrollTop(0)),m.css({left:c+p.scrollLeft(),bottom:v-p.scrollTop(),width:u}),g.css({top:d+p.scrollTop(),right:y-p.scrollLeft(),height:h})},x=function(t,e){var i=t+e,n=o-u;c=i<0?0:i>n?n:i,m.css({left:c+p.scrollLeft()})},k=function(t,e){var i=t+e,n=s-h;d=i<0?0:i>n?n:i,g.css({top:d+p.scrollTop()})},C=function(){var e,i;m.bind("mousedown.perfect-scroll",function(t){i=t.pageX,e=m.position().left,m.addClass("in-scrolling"),t.stopPropagation(),t.preventDefault()}),t(document).bind("mousemove.perfect-scroll",function(t){m.hasClass("in-scrolling")&&(x(e,t.pageX-i),_(),t.stopPropagation(),t.preventDefault())}),t(document).bind("mouseup.perfect-scroll",function(){m.hasClass("in-scrolling")&&m.removeClass("in-scrolling")})},M=function(){var e,i;g.bind("mousedown.perfect-scroll",function(t){i=t.pageY,e=g.position().top,g.addClass("in-scrolling"),t.stopPropagation(),t.preventDefault()}),t(document).bind("mousemove.perfect-scroll",function(t){g.hasClass("in-scrolling")&&(k(e,t.pageY-i),b(),t.stopPropagation(),t.preventDefault())}),t(document).bind("mouseup.perfect-scroll",function(){g.hasClass("in-scrolling")&&g.removeClass("in-scrolling")})},T=function(){var t=function(t,e){var i=p.scrollTop();if(0===i&&e>0&&0===t)return!r.wheelPropagation;if(i>=l-s&&e<0&&0===t)return!r.wheelPropagation;var n=p.scrollLeft();return 0===n&&t<0&&0===e?!r.wheelPropagation:!(n>=a-o&&t>0&&0===e)||!r.wheelPropagation};p.mousewheel(function(e,i,n,o){p.scrollTop(p.scrollTop()-o*r.wheelSpeed),p.scrollLeft(p.scrollLeft()+n*r.wheelSpeed),w(),t(n,o)&&e.preventDefault()})},S=function(){var t=function(t,e){p.scrollTop(p.scrollTop()-e),p.scrollLeft(p.scrollLeft()-t),w()},e={},i=0,n={},r=null;p.bind("touchstart.perfect-scroll",function(t){var n=t.originalEvent.targetTouches[0];e.pageX=n.pageX,e.pageY=n.pageY,i=(new Date).getTime(),null!==r&&clearInterval(r)}),p.bind("touchmove.perfect-scroll",function(r){var o=r.originalEvent.targetTouches[0],s={};s.pageX=o.pageX,s.pageY=o.pageY;var a=s.pageX-e.pageX,l=s.pageY-e.pageY;t(a,l),e=s;var u=(new Date).getTime();n.x=a/(u-i),n.y=l/(u-i),i=u,r.preventDefault()}),p.bind("touchend.perfect-scroll",function(){r=setInterval(function(){return Math.abs(n.x)<.01&&Math.abs(n.y)<.01?void clearInterval(r):(t(30*n.x,30*n.y),n.x*=.8,void(n.y*=.8))},10)})},D=function(){m.remove(),g.remove(),p.unbind("mousewheel"),p.unbind("touchstart.perfect-scroll"),p.unbind("touchmove.perfect-scroll"),p.unbind("touchend.perfect-scroll"),t(window).unbind("mousemove.perfect-scroll"),t(window).unbind("mouseup.perfect-scroll"),p.data("perfect_scrollbar",null),p.data("perfect_scrollbar_update",null),p.data("perfect_scrollbar_destroy",null)},L=/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent),A=function(){w(),C(),M(),L&&S(),p.mousewheel&&T(),p.data("perfect_scrollbar",p),p.data("perfect_scrollbar_update",w),p.data("perfect_scrollbar_destroy",D)};return A(),p}}(jQuery);var Konami=function(t){var e={addEvent:function(t,e,i,n){t.addEventListener?t.addEventListener(e,i,!1):t.attachEvent&&(t["e"+e+i]=i,t[e+i]=function(){t["e"+e+i](window.event,n)},t.attachEvent("on"+e,t[e+i]))},input:"",pattern:"38384040373937396665",load:function(t){this.addEvent(document,"keydown",function(i,n){if(n&&(e=n),e.input+=i?i.keyCode:event.keyCode,e.input.length>e.pattern.length&&(e.input=e.input.substr(e.input.length-e.pattern.length)),e.input==e.pattern)return e.code(t),e.input="",i.preventDefault(),!1},this),this.iphone.load(t)},code:function(t){window.location=t},iphone:{start_x:0,start_y:0,stop_x:0,stop_y:0,tap:!1,capture:!1,orig_keys:"",keys:["UP","UP","DOWN","DOWN","LEFT","RIGHT","LEFT","RIGHT","TAP","TAP"],code:function(t){e.code(t)},load:function(t){this.orig_keys=this.keys,e.addEvent(document,"touchmove",function(t){if(1==t.touches.length&&1==e.iphone.capture){var i=t.touches[0];e.iphone.stop_x=i.pageX,e.iphone.stop_y=i.pageY,e.iphone.tap=!1,e.iphone.capture=!1,e.iphone.check_direction()}}),e.addEvent(document,"touchend",function(){1==e.iphone.tap&&e.iphone.check_direction(t)},!1),e.addEvent(document,"touchstart",function(t){e.iphone.start_x=t.changedTouches[0].pageX,e.iphone.start_y=t.changedTouches[0].pageY,e.iphone.tap=!0,e.iphone.capture=!0})},check_direction:function(t){x_magnitude=Math.abs(this.start_x-this.stop_x),y_magnitude=Math.abs(this.start_y-this.stop_y),x=this.start_x-this.stop_x<0?"RIGHT":"LEFT",y=this.start_y-this.stop_y<0?"DOWN":"UP",result=x_magnitude>y_magnitude?x:y,result=1==this.tap?"TAP":result,result==this.keys[0]&&(this.keys=this.keys.slice(1,this.keys.length)),0==this.keys.length&&(this.keys=this.orig_keys,this.code(t))}}};return"string"==typeof t&&e.load(t),"function"==typeof t&&(e.code=t,e.load()),e};(function(){}).call(this),$(function(){$(".user-timesheet-status").tooltip({}),$(".select_all_checkbox").each(function(t,e){var i=$(e),n=$(i[0].form),r=n.find(".select-checkbox");i.change(function(){var t=i.is(":checked");r.each(function(e,i){$(i).prop("checked",t)})}),r.change(function(t){$(t.target).is(":checked")?n.find(".select-checkbox:checked").length==r.length&&i.prop("checked",!0):i.is(":checked")&&i.prop("checked",!1)})})});var toggleUserActive=function(t){var e=$("#"+t+"_active").is(":checked");payload={id:t,active:e},$.ajax({url:"/approvals/active",type:"PUT",data:payload,success:function(){},error:function(){}})},toggleExpandSubordinates=function(t,e,i){$.ajax({url:"/approvals/expand_subordinates?user_id="+t+"&start_date="+e+"&end_date="+i,type:"GET",success:function(){$("#my-team").find("#"+t).find("a.icon-chevron-right").attr("onclick","removeExpandSubordinates("+t+",'"+e+"','"+i+"'); return false;"),$("#my-team").find("#"+t).find("a.icon-chevron-right").removeClass("icon-chevron-right").addClass("icon-chevron-down")},error:function(){}})},removeExpandSubordinates=function(t,e,i){$.ajax({url:"/approvals/remove_subordinates?user_id="+t,type:"GET",success:function(){$("#my-team").find("#"+t).find("a.icon-chevron-down").attr("onclick","toggleExpandSubordinates("+t+",'"+e+"','"+i+"'); return false;"),$("#my-team").find("#"+t).find("a.icon-chevron-down").removeClass("icon-chevron-down").addClass("icon-chevron-right")},error:function(){}})},remindMyTeam=function(){$.ajax({url:"/reminder/my_team?force=1",type:"GET",dataType:"json",success:function(t){var e="";for(email in t)e+="<li>"+email+"</li>";var i="id"+Date.now();$("body").append('<div style="display: none;" class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-hidden="true" id="'+i+'"><div class="modal-dialog modal-sm"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">\xd7</span><span class="sr-only">Close</span></button><h4 class="modal-title" id="mySmallModalLabel">Reminders Sent</h4></div><div class="modal-body"><ul>'+e+"</ul></div></div></div></div>");$("#"+i).modal({backdrop:!0,keyboard:!0,show:!0})},error:function(){}})},sendReminders=function(t){var e=$("#"+t),i=e.serialize();$.ajax({url:"/reminder/timesheets",type:"POST",data:i,dataType:"json",success:function(t){console.log(t);var e="";for(email in t)e+="<li>"+email+"</li>";var i="id"+Date.now();$("body").append('<div style="display: none;" class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-hidden="true" id="'+i+'"><div class="modal-dialog modal-sm"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">\xd7</span><span class="sr-only">Close</span></button><h4 class="modal-title" id="mySmallModalLabel">Reminders Sent</h4></div><div class="modal-body"><ul>'+e+"</ul></div></div></div></div>");$("#"+i).modal({backdrop:!0,keyboard:!0,show:!0})},error:function(){}})};!function(t,e){"use strict";"function"==typeof define&&define.amd?define("bootstrap-transition",["jquery"],e):e(t.jQuery)}(this,function(t){"use strict";function e(){var t,e=document.createElement("bootstrap"),i={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(t in i)if("undefined"!=typeof e.style[t])return{end:i[t]};return!1}t.fn.emulateTransitionEnd=function(e){var i,n=!1,r=this;return t(this).one("bsTransitionEnd",function(){n=!0}),i=function(){n||t(r).trigger(t.support.transition.end)},setTimeout(i,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})})}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("bootstrap-alert",["jquery"],e):e(t.jQuery)}(this,function(t){"use strict";function e(e){return this.each(function(){var i=t(this),n=i.data("bs.alert");n||i.data("bs.alert",n=new r(this)),"string"==typeof e&&n[e].call(i)})}var i,n='[data-dismiss="alert"]',r=function(e){t(e).on("click",n,this.close)};r.VERSION="3.3.0",r.TRANSITION_DURATION=150,r.prototype.close=function(e){function i(){n.detach().trigger("closed.bs.alert").remove()}var n,o=t(this),s=o.attr("data-target");s||(s=o.attr("href")),n=t(s),e&&e.preventDefault(),n.length||(n=o.closest(".alert")),n.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(n.removeClass("in"),t.support.transition&&n.hasClass("fade")?n.one("bsTransitionEnd",i).emulateTransitionEnd(r.TRANSITION_DURATION):i())},i=t.fn.alert,t.fn.alert=e,t.fn.alert.Constructor=r,t.fn.alert.noConflict=function(){return t.fn.alert=i,this},t(document).on("click.bs.alert.data-api",n,r.prototype.close)}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("bootstrap-button",["jquery"],e):e(t.jQuery)}(this,function(t){"use strict";function e(e){return this.each(function(){var i=t(this),r=i.data("bs.button"),o="object"==typeof e&&e;r||i.data("bs.button",r=new n(this,o)),"toggle"===e?r.toggle():e&&r.setState(e)})}var i,n=function(e,i){this.$element=t(e),this.options=t.extend({},n.DEFAULTS,i),this.isLoading=!1};n.VERSION="3.3.0",n.DEFAULTS={loadingText:"loading..."},n.prototype.setState=function(e){var i="disabled",n=this.$element,r=n.is("input")?"val":"html",o=n.data();e+="Text",null!==o.resetText&&"undefined"!=typeof o.resetText||n.data("resetText",n[r]()),setTimeout(t.proxy(function(){n[r](null===o[e]?this.options[e]:o[e]),"loadingText"===e?(this.isLoading=!0,n.addClass(i).attr(i,i)):this.isLoading&&(this.isLoading=!1,n.removeClass(i).removeAttr(i))},this),0)},n.prototype.toggle=function(){var t,e=!0,i=this.$element.closest('[data-toggle="buttons"]');i.length?(t=this.$element.find("input"),"radio"===t.prop("type")&&(t.prop("checked")&&this.$element.hasClass("active")?e=!1:i.find(".active").removeClass("active")),e&&t.prop("checked",!this.$element.hasClass("active")).trigger("change")):this.$element.attr("aria-pressed",!this.$element.hasClass("active")),e&&this.$element.toggleClass("active")},i=t.fn.button,t.fn.button=e,t.fn.button.Constructor=n,t.fn.button.noConflict=function(){return t.fn.button=i,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(i){var n=t(i.target);n.hasClass("btn")||(n=n.closest(".btn")),e.call(n,"toggle"),i.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("bootstrap-carousel",["jquery"],e):e(t.jQuery)}(this,function(t){"use strict";function e(e){return this.each(function(){var i=t(this),n=i.data("bs.carousel"),o=t.extend({},r.DEFAULTS,i.data(),"object"==typeof e&&e),s="string"==typeof e?e:o.slide;n||i.data("bs.carousel",n=new r(this,o)),"number"==typeof e?n.to(e):s?n[s]():o.interval&&n.pause().cycle()})}var i,n,r=function(e,i){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=i,this.paused=this.sliding=this.interval=this.$active=this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",t.proxy(this.keydown,this)),"hover"===this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};r.VERSION="3.3.0",r.TRANSITION_DURATION=600,r.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},r.prototype.keydown=function(t){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()},r.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},r.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},r.prototype.getItemForDirection=function(t,e){var i="prev"===t?-1:1,n=this.getItemIndex(e),r=(n+i)%this.$items.length;return this.$items.eq(r)},r.prototype.to=function(t){var e=this,i=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(t>this.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):i===t?this.pause().cycle():this.slide(t>i?"next":"prev",this.$items.eq(t))},r.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},r.prototype.next=function(){if(!this.sliding)return this.slide("next")},r.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},r.prototype.slide=function(e,i){var n,o,s,a,l=this.$element.find(".item.active"),u=i||this.getItemForDirection(e,l),c=this.interval,h="next"===e?"left":"right",d="next"===e?"first":"last",p=this;if(!u.length){if(!this.options.wrap)return;u=this.$element.find(".item")[d]()}return u.hasClass("active")?this.sliding=!1:(n=u[0],o=t.Event("slide.bs.carousel",{relatedTarget:n,direction:h}),this.$element.trigger(o),o.isDefaultPrevented()?void 0:(this.sliding=!0,c&&this.pause(),this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),s=t(this.$indicators.children()[this.getItemIndex(u)]),s&&s.addClass("active")),a=t.Event("slid.bs.carousel",{relatedTarget:n,direction:h}),t.support.transition&&this.$element.hasClass("slide")?(u.addClass(e),u[0].offsetWidth,l.addClass(h),u.addClass(h),l.one("bsTransitionEnd",function(){u.removeClass([e,h].join(" ")).addClass("active"),l.removeClass(["active",h].join(" ")),p.sliding=!1,setTimeout(function(){p.$element.trigger(a)},0)}).emulateTransitionEnd(r.TRANSITION_DURATION)):(l.removeClass("active"),u.addClass("active"),this.sliding=!1,this.$element.trigger(a)),c&&this.cycle(),this))},i=t.fn.carousel,t.fn.carousel=e,t.fn.carousel.Constructor=r,t.fn.carousel.noConflict=function(){return t.fn.carousel=i,this},n=function(i){var n,r,o,s=t(this),a=t(s.attr("data-target")||(n=s.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,""));a.hasClass("carousel")&&(r=t.extend({},a.data(),s.data()),o=s.attr("data-slide-to"),o&&(r.interval=!1),e.call(a,r),o&&a.data("bs.carousel").to(o),i.preventDefault())},t(document).on("click.bs.carousel.data-api","[data-slide]",n).on("click.bs.carousel.data-api","[data-slide-to]",n),t(function(){t('[data-ride="carousel"]').each(function(){var i=t(this);e.call(i,i.data())})})}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("bootstrap-collapse",["jquery","bootstrap-transition"],e):e(t.jQuery)}(this,function(t){"use strict";function e(e){var i,n=e.attr("data-target")||(i=e.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"");return t(n)}function i(e){return this.each(function(){var i=t(this),n=i.data("bs.collapse"),o=t.extend({},r.DEFAULTS,i.data(),"object"==typeof e&&e);!n&&o.toggle&&"show"===e&&(o.toggle=!1),n||i.data("bs.collapse",n=new r(this,o)),"string"==typeof e&&n[e]()})}var n,r=function(e,i){this.$element=t(e),this.options=t.extend({},r.DEFAULTS,i),this.$trigger=t(this.options.trigger).filter('[href="#'+e.id+'"], [data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};r.VERSION="3.3.0",r.TRANSITION_DURATION=350,r.DEFAULTS={toggle:!0,trigger:'[data-toggle="collapse"]'},r.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"},r.prototype.show=function(){var e,n,o,s,a,l;if(!(this.transitioning||this.$element.hasClass("in")||(n=this.$parent&&this.$parent.find("> .panel").children(".in, .collapsing"),n&&n.length&&(e=n.data("bs.collapse"),e&&e.transitioning)||(o=t.Event("show.bs.collapse"),this.$element.trigger(o),o.isDefaultPrevented())))){if(n&&n.length&&(i.call(n,"hide"),e||n.data("bs.collapse",null)),l=this.dimension(),this.$element.removeClass("collapse").addClass("collapsing")[l](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1,a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[l](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")},!t.support.transition)return a.call(this);s=t.camelCase(["scroll",l].join("-")),this.$element.one("bsTransitionEnd",t.proxy(a,this)).emulateTransitionEnd(r.TRANSITION_DURATION)[l](this.$element[0][s])}},r.prototype.hide=function(){var e,i,n;if(!this.transitioning&&this.$element.hasClass("in")&&(n=t.Event("hide.bs.collapse"),this.$element.trigger(n),!n.isDefaultPrevented()))return i=this.dimension(),this.$element[i](this.$element[i]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1,e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")},t.support.transition?void this.$element[i](0).one("bsTransitionEnd",t.proxy(e,this)).emulateTransitionEnd(r.TRANSITION_DURATION):e.call(this)},r.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},r.prototype.getParent=function(){return t(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy(function(i,n){var r=t(n);this.addAriaAndCollapsedClass(e(r),r)},this)).end()},r.prototype.addAriaAndCollapsedClass=function(t,e){var i=t.hasClass("in");t.attr("aria-expanded",i),e.toggleClass("collapsed",!i).attr("aria-expanded",i)},n=t.fn.collapse,t.fn.collapse=i,t.fn.collapse.Constructor=r,t.fn.collapse.noConflict=function(){return t.fn.collapse=n,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(n){var r,o,s,a=t(this);a.attr("data-target")||n.preventDefault(),r=e(a),o=r.data("bs.collapse"),s=o?"toggle":t.extend({},a.data(),{trigger:this}),i.call(r,s)})}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("bootstrap-dropdown",["jquery"],e):e(t.jQuery)}(this,function(t){"use strict";function e(e){var i,n=e.attr("data-target");return n||(n=e.attr("href"),n=n&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,"")),i=n&&t(n),i&&i.length?i:e.parent()}function i(i){i&&3===i.which||(t(o).remove(),t(s).each(function(){var n=t(this),r=e(n),o={relatedTarget:this};r.hasClass("open")&&(r.trigger(i=t.Event("hide.bs.dropdown",o)),i.isDefaultPrevented()||(n.attr("aria-expanded","false"),r.removeClass("open").trigger("hidden.bs.dropdown",o)))}))}function n(e){return this.each(function(){var i=t(this),n=i.data("bs.dropdown");n||i.data("bs.dropdown",n=new a(this)),"string"==typeof e&&n[e].call(i)})}var r,o=".dropdown-backdrop",s='[data-toggle="dropdown"]',a=function(e){t(e).on("click.bs.dropdown",this.toggle)};a.VERSION="3.3.0",a.prototype.toggle=function(n){var r,o,s,a=t(this);if(!a.is(".disabled, :disabled")){if(r=e(a),o=r.hasClass("open"),i(),!o){if("ontouchstart"in document.documentElement&&!r.closest(".navbar-nav").length&&t('<div class="dropdown-backdrop"/>').insertAfter(t(this)).on("click",i),s={relatedTarget:this},r.trigger(n=t.Event("show.bs.dropdown",s)),n.isDefaultPrevented())return;a.trigger("focus").attr("aria-expanded","true"),r.toggleClass("open").trigger("shown.bs.dropdown",s)}return!1}},a.prototype.keydown=function(i){var n,r,o,a,l,u=t(this);if(/(38|40|27|32)/.test(i.which)&&(i.preventDefault(),i.stopPropagation(),!u.is(".disabled, :disabled"))){if(n=e(u),r=n.hasClass("open"),!r&&27!==i.which||r&&27===i.which)return 27===i.which&&n.find(s).trigger("focus"),u.trigger("click");o=" li:not(.divider):visible a",a=n.find('[role="menu"]'+o+', [role="listbox"]'+o),a.length&&(l=a.index(i.target),38===i.which&&l>0&&l--,40===i.which&&l<a.length-1&&l++,~l||(l=0),a.eq(l).trigger("focus"))}},r=t.fn.dropdown,t.fn.dropdown=n,t.fn.dropdown.Constructor=a,t.fn.dropdown.noConflict=function(){return t.fn.dropdown=r,this},t(document).on("click.bs.dropdown.data-api",i).on("click.bs.dropdown.data-api",".dropdown form",function(t){t.stopPropagation()}).on("click.bs.dropdown.data-api",s,a.prototype.toggle).on("keydown.bs.dropdown.data-api",s,a.prototype.keydown).on("keydown.bs.dropdown.data-api",'[role="menu"]',a.prototype.keydown).on("keydown.bs.dropdown.data-api",'[role="listbox"]',a.prototype.keydown)}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("bootstrap-modal",["jquery"],e):e(t.jQuery)}(this,function(t){"use strict";function e(e,i){return this.each(function(){var r=t(this),o=r.data("bs.modal"),s=t.extend({},n.DEFAULTS,r.data(),"object"==typeof e&&e);o||r.data("bs.modal",o=new n(this,s)),"string"==typeof e?o[e](i):s.show&&o.show(i)})}var i,n=function(e,i){this.options=i,this.$body=t(document.body),this.$element=t(e),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,t.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};n.VERSION="3.3.4",n.TRANSITION_DURATION=300,n.BACKDROP_TRANSITION_DURATION=150,n.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},n.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},n.prototype.show=function(e){var i=this,r=t.Event("show.bs.modal",{relatedTarget:e});this.$element.trigger(r),this.isShown||r.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',t.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){i.$element.one("mouseup.dismiss.bs.modal",function(e){t(e.target).is(i.$element)&&(i.ignoreBackdropClick=!0)})}),this.backdrop(function(){var r,o=t.support.transition&&i.$element.hasClass("fade");i.$element.parent().length||i.$element.appendTo(i.$body),i.$element.show().scrollTop(0),i.adjustDialog(),o&&i.$element[0].offsetWidth,i.$element.addClass("in").attr("aria-hidden",!1),i.enforceFocus(),r=t.Event("shown.bs.modal",{relatedTarget:e}),o?i.$dialog.one("bsTransitionEnd",function(){i.$element.trigger("focus").trigger(r)}).emulateTransitionEnd(n.TRANSITION_DURATION):i.$element.trigger("focus").trigger(r)}))},n.prototype.hide=function(e){e&&e.preventDefault(),e=t.Event("hide.bs.modal"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),t(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),t.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",t.proxy(this.hideModal,this)).emulateTransitionEnd(n.TRANSITION_DURATION):this.hideModal())},n.prototype.enforceFocus=function(){t(document).off("focusin.bs.modal").on("focusin.bs.modal",t.proxy(function(t){this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},n.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",t.proxy(function(t){27===t.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},n.prototype.resize=function(){this.isShown?t(window).on("resize.bs.modal",t.proxy(this.handleUpdate,this)):t(window).off("resize.bs.modal")},n.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$body.removeClass("modal-open"),t.resetAdjustments(),t.resetScrollbar(),t.$element.trigger("hidden.bs.modal")})},n.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},n.prototype.backdrop=function(e){var i,r,o=this,s=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){if(i=t.support.transition&&s,this.$backdrop=t('<div class="modal-backdrop '+s+'" />').appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",t.proxy(function(t){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(t.target===t.currentTarget&&("static"===this.options.backdrop?this.$element[0].focus():this.hide()))},this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!e)return;i?this.$backdrop.one("bsTransitionEnd",e).emulateTransitionEnd(n.BACKDROP_TRANSITION_DURATION):e()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),r=function(){o.removeBackdrop(),e&&e()},t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",r).emulateTransitionEnd(n.BACKDROP_TRANSITION_DURATION):r()):e&&e()},n.prototype.handleUpdate=function(){this.adjustDialog()},n.prototype.adjustDialog=function(){var t=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},n.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},n.prototype.checkScrollbar=function(){this.bodyIsOverflowing=document.body.clientWidth<window.innerWidth,this.scrollbarWidth=this.measureScrollbar()},n.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",t+this.scrollbarWidth)},n.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},n.prototype.measureScrollbar=function(){var t,e;return t=document.createElement("div"),t.className="modal-scrollbar-measure",this.$body.append(t),e=t.offsetWidth-t.clientWidth,this.$body[0].removeChild(t),e},i=t.fn.modal,t.fn.modal=e,t.fn.modal.Constructor=n,t.fn.modal.noConflict=function(){return t.fn.modal=i,this},t(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(i){var n=t(this),r=n.attr("href"),o=t(n.attr("data-target")||r),s=o.data("bs.modal")?"toggle":t.extend({remote:!/#/.test(r)&&r},o.data(),n.data());n.is("a")&&i.preventDefault(),o.one("show.bs.modal",function(t){t.isDefaultPrevented()||o.one("hidden.bs.modal",function(){n.is(":visible")&&n.trigger("focus")})}),e.call(o,s,this)})}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("bootstrap-tooltip",["jquery"],e):e(t.jQuery)}(this,function(t){"use strict";function e(e){return this.each(function(){var i=t(this),r=i.data("bs.tooltip"),o="object"==typeof e&&e,s=o&&o.selector;(r||"destroy"!==e)&&(s?(r||i.data("bs.tooltip",r={}),r[s]||(r[s]=new n(this,o))):r||i.data("bs.tooltip",r=new n(this,o)),"string"==typeof e&&r[e]())})}var i,n=function(t,e){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",t,e)};n.VERSION="3.3.0",n.TRANSITION_DURATION=150,n.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0
}},n.prototype.init=function(e,i,n){var r,o,s,a,l;for(this.enabled=!0,this.type=e,this.$element=t(i),this.options=this.getOptions(n),this.$viewport=this.options.viewport&&t(this.options.viewport.selector||this.options.viewport),r=this.options.trigger.split(" "),o=r.length;o--;)s=r[o],"click"===s?this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this)):"manual"!==s&&(a="hover"===s?"mouseenter":"focusin",l="hover"===s?"mouseleave":"focusout",this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this)));this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},n.prototype.getDelegateOptions=function(){var e={},i=this.getDefaults();return this._options&&t.each(this._options,function(t,n){i[t]!==n&&(e[t]=n)}),e},n.prototype.enter=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return i&&i.$tip&&i.$tip.is(":visible")?void(i.hoverState="in"):(i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),clearTimeout(i.timeout),i.hoverState="in",i.options.delay&&i.options.delay.show?void(i.timeout=setTimeout(function(){"in"===i.hoverState&&i.show()},i.options.delay.show)):i.show())},n.prototype.leave=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),clearTimeout(i.timeout),i.hoverState="out",i.options.delay&&i.options.delay.hide?void(i.timeout=setTimeout(function(){"out"===i.hoverState&&i.hide()},i.options.delay.hide)):i.hide()},n.prototype.show=function(){var e,i,r,o,s,a,l,u,c,h,d,p,f,m,g=this,v=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(v),e=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]),v.isDefaultPrevented()||!e)return;i=this.tip(),r=this.getUID(this.type),this.setContent(),i.attr("id",r),this.$element.attr("aria-describedby",r),this.options.animation&&i.addClass("fade"),o="function"==typeof this.options.placement?this.options.placement.call(this,i[0],this.$element[0]):this.options.placement,s=/\s?auto?\s?/i,a=s.test(o),a&&(o=o.replace(s,"")||"top"),i.detach().css({top:0,left:0,display:"block"}).addClass(o).data("bs."+this.type,this),this.options.container?i.appendTo(this.options.container):i.insertAfter(this.$element),l=this.getPosition(),u=i[0].offsetWidth,c=i[0].offsetHeight,a&&(h=o,d=this.options.container?t(this.options.container):this.$element.parent(),p=this.getPosition(d),o="bottom"===o&&l.bottom+c>p.bottom?"top":"top"===o&&l.top-c<p.top?"bottom":"right"===o&&l.right+u>p.width?"left":"left"===o&&l.left-u<p.left?"right":o,i.removeClass(h).addClass(o)),f=this.getCalculatedOffset(o,l,u,c),this.applyPlacement(f,o),m=function(){var t=g.hoverState;g.$element.trigger("shown.bs."+g.type),g.hoverState=null,"out"===t&&g.leave(g)},t.support.transition&&this.$tip.hasClass("fade")?i.one("bsTransitionEnd",m).emulateTransitionEnd(n.TRANSITION_DURATION):m()}},n.prototype.applyPlacement=function(e,i){var n,r,o,s,a,l,u=this.tip(),c=u[0].offsetWidth,h=u[0].offsetHeight,d=parseInt(u.css("margin-top"),10),p=parseInt(u.css("margin-left"),10);isNaN(d)&&(d=0),isNaN(p)&&(p=0),e.top=e.top+d,e.left=e.left+p,t.offset.setOffset(u[0],t.extend({using:function(t){u.css({top:Math.round(t.top),left:Math.round(t.left)})}},e),0),u.addClass("in"),n=u[0].offsetWidth,r=u[0].offsetHeight,"top"===i&&r!==h&&(e.top=e.top+h-r),o=this.getViewportAdjustedDelta(i,e,n,r),o.left?e.left+=o.left:e.top+=o.top,s=/top|bottom/.test(i),a=s?2*o.left-c+n:2*o.top-h+r,l=s?"offsetWidth":"offsetHeight",u.offset(e),this.replaceArrow(a,u[0][l],s)},n.prototype.replaceArrow=function(t,e,i){this.arrow().css(i?"left":"top",50*(1-t/e)+"%").css(i?"top":"left","")},n.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();t.find(".tooltip-inner")[this.options.html?"html":"text"](e),t.removeClass("fade in top bottom left right")},n.prototype.hide=function(e){function i(){"in"!==r.hoverState&&o.detach(),r.$element.removeAttr("aria-describedby").trigger("hidden.bs."+r.type),e&&e()}var r=this,o=this.tip(),s=t.Event("hide.bs."+this.type);if(this.$element.trigger(s),!s.isDefaultPrevented())return o.removeClass("in"),t.support.transition&&this.$tip.hasClass("fade")?o.one("bsTransitionEnd",i).emulateTransitionEnd(n.TRANSITION_DURATION):i(),this.hoverState=null,this},n.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},n.prototype.hasContent=function(){return this.getTitle()},n.prototype.getPosition=function(e){var i,n,r,o,s,a;return e=e||this.$element,i=e[0],n="BODY"===i.tagName,r=i.getBoundingClientRect(),null===r.width&&(r=t.extend({},r,{width:r.right-r.left,height:r.bottom-r.top})),o=n?{top:0,left:0}:e.offset(),s={scroll:n?document.documentElement.scrollTop||document.body.scrollTop:e.scrollTop()},a=n?{width:t(window).width(),height:t(window).height()}:null,t.extend({},r,s,a,o)},n.prototype.getCalculatedOffset=function(t,e,i,n){return"bottom"===t?{top:e.top+e.height,left:e.left+e.width/2-i/2}:"top"===t?{top:e.top-n,left:e.left+e.width/2-i/2}:"left"===t?{top:e.top+e.height/2-n/2,left:e.left-i}:{top:e.top+e.height/2-n/2,left:e.left+e.width}},n.prototype.getViewportAdjustedDelta=function(t,e,i,n){var r,o,s,a,l,u,c={top:0,left:0};return this.$viewport?(r=this.options.viewport&&this.options.viewport.padding||0,o=this.getPosition(this.$viewport),/right|left/.test(t)?(s=e.top-r-o.scroll,a=e.top+r-o.scroll+n,s<o.top?c.top=o.top-s:a>o.top+o.height&&(c.top=o.top+o.height-a)):(l=e.left-r,u=e.left+r+i,l<o.left?c.left=o.left-l:u>o.width&&(c.left=o.left+o.width-u)),c):c},n.prototype.getTitle=function(){var t,e=this.$element,i=this.options;return t=e.attr("data-original-title")||("function"==typeof i.title?i.title.call(e[0]):i.title)},n.prototype.getUID=function(t){do t+=~~(1e6*Math.random());while(document.getElementById(t));return t},n.prototype.tip=function(){return this.$tip=this.$tip||t(this.options.template)},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},n.prototype.enable=function(){this.enabled=!0},n.prototype.disable=function(){this.enabled=!1},n.prototype.toggleEnabled=function(){this.enabled=!this.enabled},n.prototype.toggle=function(e){var i=this;e&&(i=t(e.currentTarget).data("bs."+this.type),i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i))),i.tip().hasClass("in")?i.leave(i):i.enter(i)},n.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type)})},i=t.fn.tooltip,t.fn.tooltip=e,t.fn.tooltip.Constructor=n,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=i,this}}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("bootstrap-popover",["jquery","bootstrap-tooltip"],e):e(t.jQuery)}(this,function(t){"use strict";function e(e){return this.each(function(){var i=t(this),r=i.data("bs.popover"),o="object"==typeof e&&e,s=o&&o.selector;(r||"destroy"!==e)&&(s?(r||i.data("bs.popover",r={}),r[s]||(r[s]=new n(this,o))):r||i.data("bs.popover",r=new n(this,o)),"string"==typeof e&&r[e]())})}var i,n=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");n.VERSION="3.3.0",n.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),n.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),n.prototype.constructor=n,n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof i?"html":"append":"text"](i),t.removeClass("fade top bottom left right in")},n.prototype.hasContent=function(){return this.getTitle()||this.getContent()},n.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},n.prototype.tip=function(){return this.$tip||(this.$tip=t(this.options.template)),this.$tip},i=t.fn.popover,t.fn.popover=e,t.fn.popover.Constructor=n,t.fn.popover.noConflict=function(){return t.fn.popover=i,this}}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("bootstrap-scrollspy",["jquery"],e):e(t.jQuery)}(this,function(t){"use strict";function e(i,n){var r=t.proxy(this.process,this);this.$body=t("body"),this.$scrollElement=t(t(i).is("body")?window:i),this.options=t.extend({},e.DEFAULTS,n),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",r),this.refresh(),this.process()}function i(i){return this.each(function(){var n=t(this),r=n.data("bs.scrollspy"),o="object"==typeof i&&i;r||n.data("bs.scrollspy",r=new e(this,o)),"string"==typeof i&&r[i]()})}var n;e.VERSION="3.3.0",e.DEFAULTS={offset:10},e.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},e.prototype.refresh=function(){var e="offset",i=0,n=this;t.isWindow(this.$scrollElement[0])||(e="position",i=this.$scrollElement.scrollTop()),this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),this.$body.find(this.selector).map(function(){var n=t(this),r=n.data("target")||n.attr("href"),o=/^#./.test(r)&&t(r);return o&&o.length&&o.is(":visible")&&[[o[e]().top+i,r]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){n.offsets.push(this[0]),n.targets.push(this[1])})},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,i=this.getScrollHeight(),n=this.options.offset+i-this.$scrollElement.height(),r=this.offsets,o=this.targets,s=this.activeTarget;if(this.scrollHeight!==i&&this.refresh(),e>=n)return s!==(t=o[o.length-1])&&this.activate(t);if(s&&e<r[0])return this.activeTarget=null,this.clear();for(t=r.length;t--;)s!==o[t]&&e>=r[t]&&(!r[t+1]||e<=r[t+1])&&this.activate(o[t])},e.prototype.activate=function(e){var i,n;this.activeTarget=e,this.clear(),i=this.selector+'[data-target="'+e+'"],'+this.selector+'[href="'+e+'"]',n=t(i).parents("li").addClass("active"),n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown").addClass("active")),n.trigger("activate.bs.scrollspy")},e.prototype.clear=function(){t(this.selector).parentsUntil(this.options.target,".active").removeClass("active")},n=t.fn.scrollspy,t.fn.scrollspy=i,t.fn.scrollspy.Constructor=e,t.fn.scrollspy.noConflict=function(){return t.fn.scrollspy=n,this},t(function(){t('[data-spy="scroll"]').each(function(){var e=t(this);i.call(e,e.data())})})}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("bootstrap-tab",["jquery"],e):e(t.jQuery)}(this,function(t){"use strict";function e(e){return this.each(function(){var i=t(this),n=i.data("bs.tab");n||i.data("bs.tab",n=new r(this)),"string"==typeof e&&n[e]()})}var i,n,r=function(e){this.element=t(e)};r.VERSION="3.3.0",r.TRANSITION_DURATION=150,r.prototype.show=function(){var e,i,n,r,o=this.element,s=o.closest("ul:not(.dropdown-menu)"),a=o.data("target");a||(a=o.attr("href")),o.parent("li").hasClass("active")||(e=s.find(".active:last a"),i=t.Event("hide.bs.tab",{relatedTarget:o[0]}),n=t.Event("show.bs.tab",{relatedTarget:e[0]}),e.trigger(i),o.trigger(n),n.isDefaultPrevented()||i.isDefaultPrevented()||(r=t(a),this.activate(o.closest("li"),s),this.activate(r,r.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:o[0]}),o.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})))},r.prototype.activate=function(e,i,n){function o(){s.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),a?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu")&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),n&&n()}var s=i.find("> .active"),a=n&&t.support.transition&&(s.length&&s.hasClass("fade")||!!i.find("> .fade").length);s.length&&a?s.one("bsTransitionEnd",o).emulateTransitionEnd(r.TRANSITION_DURATION):o(),s.removeClass("in")},i=t.fn.tab,t.fn.tab=e,t.fn.tab.Constructor=r,t.fn.tab.noConflict=function(){return t.fn.tab=i,this},n=function(i){i.preventDefault(),e.call(t(this),"show")},t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',n).on("click.bs.tab.data-api",'[data-toggle="pill"]',n)}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("bootstrap-affix",["jquery"],e):e(t.jQuery)}(this,function(t){"use strict";function e(e){return this.each(function(){var i=t(this),r=i.data("bs.affix"),o="object"==typeof e&&e;r||i.data("bs.affix",r=new n(this,o)),"string"==typeof e&&r[e]()})}var i,n=function(e,i){this.options=t.extend({},n.DEFAULTS,i),this.$target=t(this.options.target).on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};n.VERSION="3.3.0",n.RESET="affix affix-top affix-bottom",n.DEFAULTS={offset:0,target:window},n.prototype.getState=function(t,e,i,n){var r,o,s,a=this.$target.scrollTop(),l=this.$element.offset(),u=this.$target.height();return null!==i&&"top"===this.affixed?a<i&&"top":"bottom"===this.affixed?null!==i?!(a+this.unpin<=l.top)&&"bottom":!(a+u<=t-n)&&"bottom":(r=null===this.affixed,o=r?a:l.top,s=r?u:e,null!==i&&o<=i?"top":null!==n&&o+s>=t-n&&"bottom")},n.prototype.getPinnedOffset=function(){var t,e;return this.pinnedOffset?this.pinnedOffset:(this.$element.removeClass(n.RESET).addClass("affix"),t=this.$target.scrollTop(),e=this.$element.offset(),this.pinnedOffset=e.top-t)},n.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},n.prototype.checkPosition=function(){var e,i,r,o,s,a,l,u;if(this.$element.is(":visible")){if(e=this.$element.height(),i=this.options.offset,r=i.top,o=i.bottom,s=t("body").height(),"object"!=typeof i&&(o=r=i),"function"==typeof r&&(r=i.top(this.$element)),"function"==typeof o&&(o=i.bottom(this.$element)),a=this.getState(s,e,r,o),this.affixed!==a){if(null!==this.unpin&&this.$element.css("top",""),l="affix"+(a?"-"+a:""),u=t.Event(l+".bs.affix"),this.$element.trigger(u),u.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"===a?this.getPinnedOffset():null,this.$element.removeClass(n.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"===a&&this.$element.offset({top:s-e-o})}},i=t.fn.affix,t.fn.affix=e,t.fn.affix.Constructor=n,t.fn.affix.noConflict=function(){return t.fn.affix=i,this},t(function(){t('[data-spy="affix"]').each(function(){var i=t(this),n=i.data();n.offset=n.offset||{},null!==n.offsetBottom&&(n.offset.bottom=n.offsetBottom),null!==n.offsetTop&&(n.offset.top=n.offsetTop),e.call(i,n)})})}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("bootstrap-loading",["jquery","bootstrap-transition"],e):e(t.jQuery)}(this,function(t){"use strict";function e(e){return this.each(function(){var i=t(this),r=i.data("bs.loading"),o="object"==typeof e&&e;r||i.data("bs.loading",r=new n(this,o)),"string"==typeof e&&r[e]()})}var i,n=function(e,i){this.$element=t(e),this.element=e,this.options=t.extend({},n.DEFAULTS,i)};n.TRANSITION_DURATION=150,n.VERSION="3.0.0",n.DEFAULTS={template:'<div class="ha-loading-overlay fade in"><i class="icon-birdhouse icon-white icon-xl" aria-hidden="true"></i><ul><li class="li1"></li><li class="li2"></li><li class="li3"></li><li class="li4"></li></ul></div>'},n.prototype.getUID=function(t){do t+=~~(1e6*Math.random());while(document.getElementById(t));return t},n.prototype.overlay=function(){return this.$overlay=this.$overlay||t(this.options.template)},n.prototype.hide=function(){function e(){o.detach().trigger("hidden.bs.loading").remove(),i.$element.removeClass("ha-loading-container position-relative")}var i=this,r=t.Event("hide.bs.loading"),o=t("#"+this.$element.data("overlay-id"));this.$element.trigger(r),o.removeClass("in"),t.support.transition&&o.hasClass("fade")?o.one("bsTransitionEnd",e).emulateTransitionEnd(n.TRANSITION_DURATION):e()},n.prototype.show=function(){var e=t.Event("show.bs.loading"),i=this.element.style.position,n=this.overlay(),r=this.getUID("loading");this.$element.trigger(e),""===i&&this.$element.addClass("position-relative"),n.attr("id",r).addClass("in").appendTo(this.$element),this.$element.addClass("ha-loading-container").data("overlay-id",r)},i=t.fn.loading,t.fn.loading=e,t.fn.loading.Constructor=n,t.fn.loading.noConflict=function(){return t.fn.loading=i,this},t(function(){t('[data-loading="show"]').each(function(){var i=t(this);e.call(i,"show")})})}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("bootstrap-slidemenu",["jquery","bootstrap-transition"],e):e(t.jQuery)}(this,function(t){"use strict";function e(e){t(e.target).closest("ul.nav").addClass("sub-nav-out")}function i(e){t(e.target).closest("ul.nav").removeClass("sub-nav-out")}function n(e){var i,n=e.attr("data-target")||(i=e.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"");return t(n)}function r(e){return this.each(function(){var i=t(this),n=i.data("bs.slidemenu"),r="object"==typeof e&&e;!n&&r.toggle&&"show"===e&&(r.toggle=!1),n||i.data("bs.slidemenu",n=new s(this,r)),"string"==typeof e&&n[e]()})}var o,s=function(e,i){var n=this;this.$element=t(e),this.element=e,this.$body=t(document.body),this.$backdrop=null,this.transitioning=null,this.options=t.extend({},s.DEFAULTS,i),t(window).resize(function(){n.$backdrop&&!n.$backdrop.is(":visible")&&n.hide(!0)}),this.options.toggle&&this.toggle()};s.TRANSITION_DURATION=500,s.VERSION="3.0.0",s.DEFAULTS={toggle:!0,trigger:'[data-toggle="slidemenu"]'},s.prototype.width=function(){return this.$element.outerWidth()},s.prototype.handleDropdownClosed=function(){t(".dropdown",this.$element).unbind("shown.bs.dropdown",e).unbind("hidden.bs.dropdown",i)},s.prototype.hide=function(e){var i,n;if(!this.transitioning&&this.$element.hasClass("out")&&(i=t.Event("hide.bs.slidemenu"),this.$element.trigger(i),!i.isDefaultPrevented()))return this.transitioning=1,this.removeBackdrop(),this.$body.css("left",0),this.$element.css("left","-"+this.width()+"px"),n=function(){this.$element.removeClass("out").attr("aria-expanded",!1).removeAttr("style"),this.$body.removeClass("slide-out").removeAttr("style"),this.transitioning=0,this.handleDropdownClosed(),this.$element.trigger("hidden.bs.slidemenu")},!t.support.transition||e?n.call(this):void this.$element.one("bsTransitionEnd",t.proxy(n,this)).emulateTransitionEnd(s.TRANSITION_DURATION)},s.prototype.handleDropdownOpen=function(){t(".dropdown",this.$element).on("shown.bs.dropdown",e).on("hidden.bs.dropdown",i)},s.prototype.show=function(){var e,i;if(!this.transitioning&&!this.$element.hasClass("out")&&(e=t.Event("show.bs.slidemenu"),this.$element.trigger(e),!e.isDefaultPrevented()))return this.transitioning=1,this.$element.addClass("out").attr("aria-expanded",!0),this.$body.addClass("slide-out"),i=function(){this.transitioning=0,this.handleDropdownOpen(),this.$element.trigger("shown.bs.slidemenu")},this.$body.css("left",this.width()),this.$element.css("left",0),this.addBackdrop(),t.support.transition?void this.$element.one("bsTransitionEnd",t.proxy(i,this)).emulateTransitionEnd(s.TRANSITION_DURATION):i.call(this)},s.prototype.addBackdrop=function(){var e=this;this.$backdrop=t('<div class="slide-backdrop"></div>'),this.$body.prepend(this.$backdrop),this.$backdrop.css("left",this.width()),this.$backdrop.on("click",function(){e.hide()})},s.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},s.prototype.toggle=function(){this[this.$element.hasClass("out")?"hide":"show"]()},o=t.fn.slidemenu,t.fn.slidemenu=r,t.fn.slidemenu.Constructor=s,t.fn.slidemenu.noConflict=function(){return t.fn.slidemenu=o,this},t(document).on("click.bs.slidemenu.data-api",'[data-toggle="slidemenu"]',function(e){var i,o,s,a=t(this);a.attr("data-target")||e.preventDefault(),i=n(t(this)),o=i.data("bs.slidemenu"),s=o?"toggle":t.extend({},a.data(),{trigger:this}),r.call(i,s)})}),function(){var t=[].slice;this.ActionCable={INTERNAL:{message_types:{welcome:"welcome",ping:"ping",confirmation:"confirm_subscription",rejection:"reject_subscription"},default_mount_path:"/cable",protocols:["actioncable-v1-json","actioncable-unsupported"]},createConsumer:function(t){var e;return null==t&&(t=null!=(e=this.getConfig("url"))?e:this.INTERNAL.default_mount_path),new ActionCable.Consumer(this.createWebSocketURL(t))},getConfig:function(t){var e;return e=document.head.querySelector("meta[name='action-cable-"+t+"']"),null!=e?e.getAttribute("content"):void 0},createWebSocketURL:function(t){var e;return t&&!/^wss?:/i.test(t)?(e=document.createElement("a"),e.href=t,e.href=e.href,e.protocol=e.protocol.replace("http","ws"),e.href):t},startDebugging:function(){return this.debugging=!0},stopDebugging:function(){return this.debugging=null},log:function(){var e;if(e=1<=arguments.length?t.call(arguments,0):[],this.debugging)return e.push(Date.now()),console.log.apply(console,["[ActionCable]"].concat(t.call(e)))}},"undefined"!=typeof window&&null!==window&&(window.ActionCable=this.ActionCable),"undefined"!=typeof module&&null!==module&&(module.exports=this.ActionCable)}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}};ActionCable.ConnectionMonitor=function(){function e(e){this.connection=e,this.visibilityDidChange=t(this.visibilityDidChange,this),this.reconnectAttempts=0}var i,n,r;return e.pollInterval={min:3,max:30},e.staleThreshold=6,e.prototype.start=function(){if(!this.isRunning())return this.startedAt=n(),delete this.stoppedAt,this.startPolling(),document.addEventListener("visibilitychange",this.visibilityDidChange),ActionCable.log("ConnectionMonitor started. pollInterval = "+this.getPollInterval()+" ms")},e.prototype.stop=function(){if(this.isRunning())return this.stoppedAt=n(),this.stopPolling(),document.removeEventListener("visibilitychange",this.visibilityDidChange),ActionCable.log("ConnectionMonitor stopped")},e.prototype.isRunning=function(){return null!=this.startedAt&&null==this.stoppedAt},e.prototype.recordPing=function(){return this.pingedAt=n()},e.prototype.recordConnect=function(){return this.reconnectAttempts=0,this.recordPing(),delete this.disconnectedAt,ActionCable.log("ConnectionMonitor recorded connect")},e.prototype.recordDisconnect=function(){return this.disconnectedAt=n(),ActionCable.log("ConnectionMonitor recorded disconnect")},e.prototype.startPolling=function(){return this.stopPolling(),this.poll()},e.prototype.stopPolling=function(){return clearTimeout(this.pollTimeout)},e.prototype.poll=function(){return this.pollTimeout=setTimeout(function(t){return function(){return t.reconnectIfStale(),t.poll()}}(this),this.getPollInterval())},e.prototype.getPollInterval=function(){var t,e,n,r;return r=this.constructor.pollInterval,n=r.min,e=r.max,t=5*Math.log(this.reconnectAttempts+1),Math.round(1e3*i(t,n,e))},e.prototype.reconnectIfStale=function(){if(this.connectionIsStale())return ActionCable.log("ConnectionMonitor detected stale connection. reconnectAttempts = "+this.reconnectAttempts+", pollInterval = "+this.getPollInterval()+" ms, time disconnected = "+r(this.disconnectedAt)+" s, stale threshold = "+this.constructor.staleThreshold+" s"),this.reconnectAttempts++,this.disconnectedRecently()?ActionCable.log("ConnectionMonitor skipping reopening recent disconnect"):(ActionCable.log("ConnectionMonitor reopening"),this.connection.reopen())},e.prototype.connectionIsStale=function(){var t;return r(null!=(t=this.pingedAt)?t:this.startedAt)>this.constructor.staleThreshold},e.prototype.disconnectedRecently=function(){return this.disconnectedAt&&r(this.disconnectedAt)<this.constructor.staleThreshold},e.prototype.visibilityDidChange=function(){if("visible"===document.visibilityState)return setTimeout(function(t){return function(){if(t.connectionIsStale()||!t.connection.isOpen())return ActionCable.log("ConnectionMonitor reopening stale connection on visibilitychange. visbilityState = "+document.visibilityState),t.connection.reopen()}}(this),200)},n=function(){return(new Date).getTime()},r=function(t){return(n()-t)/1e3},i=function(t,e,i){return Math.max(e,Math.min(i,t))},e}()}.call(this),function(){var t,e,i,n,r,o,s=[].slice,a=function(t,e){return function(){return t.apply(e,arguments)}},l=[].indexOf||function(t){for(var e=0,i=this.length;e<i;e++)if(e in this&&this[e]===t)return e;return-1};n=ActionCable.INTERNAL,e=n.message_types,i=n.protocols,r=2<=i.length?s.call(i,0,t=i.length-1):(t=0,[]),o=i[t++],ActionCable.Connection=function(){function t(t){this.consumer=t,this.open=a(this.open,this),this.subscriptions=this.consumer.subscriptions,this.monitor=new ActionCable.ConnectionMonitor(this),this.disconnected=!0}return t.reopenDelay=500,t.prototype.send=function(t){return!!this.isOpen()&&(this.webSocket.send(JSON.stringify(t)),!0)},t.prototype.open=function(){if(this.isActive())throw ActionCable.log("Attempted to open WebSocket, but existing socket is "+this.getState()),new Error("Existing connection must be closed before opening");return ActionCable.log("Opening WebSocket, current state is "+this.getState()+", subprotocols: "+i),null!=this.webSocket&&this.uninstallEventHandlers(),this.webSocket=new WebSocket(this.consumer.url,i),this.installEventHandlers(),this.monitor.start(),!0},t.prototype.close=function(t){var e,i;if(e=(null!=t?t:{allowReconnect:!0}).allowReconnect,e||this.monitor.stop(),this.isActive())return null!=(i=this.webSocket)?i.close():void 0},t.prototype.reopen=function(){var t;if(ActionCable.log("Reopening WebSocket, current state is "+this.getState()),!this.isActive())return this.open();try{return this.close()}catch(e){return t=e,ActionCable.log("Failed to reopen WebSocket",t)}finally{ActionCable.log("Reopening WebSocket in "+this.constructor.reopenDelay+"ms"),setTimeout(this.open,this.constructor.reopenDelay)}},t.prototype.getProtocol=function(){var t;return null!=(t=this.webSocket)?t.protocol:void 0},t.prototype.isOpen=function(){return this.isState("open")},t.prototype.isActive=function(){return this.isState("open","connecting")},t.prototype.isProtocolSupported=function(){var t;return t=this.getProtocol(),l.call(r,t)>=0},t.prototype.isState=function(){var t,e;return e=1<=arguments.length?s.call(arguments,0):[],t=this.getState(),l.call(e,t)>=0},t.prototype.getState=function(){var t,e,i;for(e in WebSocket)if(i=WebSocket[e],i===(null!=(t=this.webSocket)?t.readyState:void 0))return e.toLowerCase();return null},t.prototype.installEventHandlers=function(){var t,e;for(t in this.events)e=this.events[t].bind(this),this.webSocket["on"+t]=e},t.prototype.uninstallEventHandlers=function(){var t;for(t in this.events)this.webSocket["on"+t]=function(){}},t.prototype.events={message:function(t){var i,n,r,o;if(this.isProtocolSupported())switch(r=JSON.parse(t.data),i=r.identifier,n=r.message,o=r.type,o){case e.welcome:return this.monitor.recordConnect(),this.subscriptions.reload();case e.ping:return this.monitor.recordPing();case e.confirmation:return this.subscriptions.notify(i,"connected");case e.rejection:return this.subscriptions.reject(i);default:return this.subscriptions.notify(i,"received",n)}},open:function(){if(ActionCable.log("WebSocket onopen event, using '"+this.getProtocol()+"' subprotocol"),this.disconnected=!1,!this.isProtocolSupported())return ActionCable.log("Protocol is unsupported. Stopping monitor and disconnecting."),this.close({allowReconnect:!1})},close:function(){if(ActionCable.log("WebSocket onclose event"),!this.disconnected)return this.disconnected=!0,this.monitor.recordDisconnect(),this.subscriptions.notifyAll("disconnected",{willAttemptReconnect:this.monitor.isRunning()})},error:function(){return ActionCable.log("WebSocket onerror event")}},t}()}.call(this),function(){var t=[].slice;ActionCable.Subscriptions=function(){function e(t){this.consumer=t,this.subscriptions=[]}return e.prototype.create=function(t,e){var i,n,r;return i=t,n="object"==typeof i?i:{channel:i},r=new ActionCable.Subscription(this.consumer,n,e),this.add(r)},e.prototype.add=function(t){return this.subscriptions.push(t),this.consumer.ensureActiveConnection(),this.notify(t,"initialized"),this.sendCommand(t,"subscribe"),t},e.prototype.remove=function(t){return this.forget(t),this.findAll(t.identifier).length||this.sendCommand(t,"unsubscribe"),t},e.prototype.reject=function(t){var e,i,n,r,o;for(n=this.findAll(t),r=[],e=0,i=n.length;e<i;e++)o=n[e],this.forget(o),this.notify(o,"rejected"),r.push(o);return r},e.prototype.forget=function(t){var e;return this.subscriptions=function(){var i,n,r,o;for(r=this.subscriptions,o=[],i=0,n=r.length;i<n;i++)e=r[i],e!==t&&o.push(e);return o}.call(this),t},e.prototype.findAll=function(t){var e,i,n,r,o;for(n=this.subscriptions,r=[],e=0,i=n.length;e<i;e++)o=n[e],o.identifier===t&&r.push(o);return r},e.prototype.reload=function(){var t,e,i,n,r;for(i=this.subscriptions,n=[],t=0,e=i.length;t<e;t++)r=i[t],n.push(this.sendCommand(r,"subscribe"));return n},e.prototype.notifyAll=function(){var e,i,n,r,o,s,a;for(i=arguments[0],e=2<=arguments.length?t.call(arguments,1):[],o=this.subscriptions,s=[],n=0,r=o.length;n<r;n++)a=o[n],s.push(this.notify.apply(this,[a,i].concat(t.call(e))));return s},e.prototype.notify=function(){var e,i,n,r,o,s,a;for(s=arguments[0],i=arguments[1],e=3<=arguments.length?t.call(arguments,2):[],a="string"==typeof s?this.findAll(s):[s],o=[],n=0,r=a.length;n<r;n++)s=a[n],o.push("function"==typeof s[i]?s[i].apply(s,e):void 0);return o},e.prototype.sendCommand=function(t,e){var i;return i=t.identifier,this.consumer.send({command:e,identifier:i})},e}()}.call(this),function(){ActionCable.Subscription=function(){function t(t,i,n){this.consumer=t,null==i&&(i={}),this.identifier=JSON.stringify(i),e(this,n)}var e;return t.prototype.perform=function(t,e){return null==e&&(e={}),e.action=t,this.send(e)},t.prototype.send=function(t){return this.consumer.send({command:"message",identifier:this.identifier,data:JSON.stringify(t)})},t.prototype.unsubscribe=function(){return this.consumer.subscriptions.remove(this)},e=function(t,e){var i,n;if(null!=e)for(i in e)n=e[i],t[i]=n;return t},t}()}.call(this),function(){ActionCable.Consumer=function(){function t(t){this.url=t,this.subscriptions=new ActionCable.Subscriptions(this),this.connection=new ActionCable.Connection(this)}return t.prototype.send=function(t){return this.connection.send(t)},t.prototype.connect=function(){return this.connection.open()},t.prototype.disconnect=function(){return this.connection.close({allowReconnect:!1})},t.prototype.ensureActiveConnection=function(){if(!this.connection.isActive())return this.connection.open()},t}()}.call(this),function(){this.App||(this.App={}),App.cable=ActionCable.createConsumer()}.call(this),function(){}.call(this),function(){}.call(this),function(){}.call(this),function(){}.call(this),$(function(){$('a[data-toggle="tab"]').on("shown.bs.tab",function(){var t=document.createEvent("Event");t.initEvent("resize",!0,!0),window.dispatchEvent(t)}),new Konami("https://gifsound.com/?gif=imgur.com/Pr0ovJm.gif&v=77Ms1oCiDH4&s=25")}),function(){}.call(this),$(function(){enablePopovers(),enableListeners()});var enablePortfolioPopovers=function(){$(".portfolio-name").each(function(t,e){$(e).popover({html:!0,container:"body",placement:"auto left",trigger:"hover focus",content:function(){return $("#tooltip_for_portfolio_id"+$(e).attr("portfolio-id")).html()}})})},enableCategoryPopovers=function(){$(".category-description").each(function(t,e){$(e).popover({html:!0,container:"body",
placement:"auto bottom",trigger:"hover focus",content:function(){return $("#tooltip_for_category_id"+$(e).attr("category-id")).html()}})})},enablePopovers=function(){enablePortfolioPopovers(),enableCategoryPopovers()},removePopovers=function(){$(".portfolio-name").popover("destroy"),$(".category-description").popover("destroy")},enableListeners=function(){$(".hours-input").on("change",function(t){saveHours($(t.target))})},allLoading=function(){$(".hour-input-container").loading("show")},clearLoadings=function(){$(".ha-loading-container").loading("hide")},allDisabled=function(){$(".hours-input").prop("disabled",!0)},allEnabled=function(){$(".hours-input").prop("disabled",!1)},saveHours=function(t){var e=$("input[name=timesheet]").serialize()+"&"+t.serialize(),i=t.attr("value");allDisabled(),t&&($(t.parent().first()).loading("show"),$(t.parent().first()).removeClass("has-error"),$("#"+$(t).attr("id")+"_check_failure").remove()),$.ajax({url:"/timesheet_entry/update",type:"PUT",data:e,success:function(){allEnabled();var e=$("#"+$(t).attr("id")).parent().first();e.addClass("has-success"),$(t).loading("hide");var i=$("#"+$(t).attr("id")+"_check_success");i.fadeIn("slow",function(){$(this).delay(1e3).fadeOut("slow")}),setTimeout(function(){e.removeClass("has-success")},1600)},error:function(){allEnabled(),$("#"+$(t).attr("id")).val(i),$("#"+$(t).attr("id")).parent().first().addClass("has-error"),$(t).loading("hide");var e=$("#"+$(t).attr("id")+"_check_failure");e.fadeIn("slow")}})};(function(){}).call(this);var checkReminderTimeVisibility=function(){var t=$("#emailNotifications").is(":checked")||$("#slackNotifications").is(":checked");t?$(".reminder-time-container").show(500):$(".reminder-time-container").hide(500)};(function(){}).call(this),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(t){function e(e,n){var r,o,s,a=e.nodeName.toLowerCase();return"area"===a?(r=e.parentNode,o=r.name,!(!e.href||!o||"map"!==r.nodeName.toLowerCase())&&(s=t("img[usemap='#"+o+"']")[0],!!s&&i(s))):(/^(input|select|textarea|button|object)$/.test(a)?!e.disabled:"a"===a?e.href||n:n)&&i(e)}function i(e){return t.expr.filters.visible(e)&&!t(e).parents().addBack().filter(function(){return"hidden"===t.css(this,"visibility")}).length}t.ui=t.ui||{},t.extend(t.ui,{version:"1.11.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),t.fn.extend({scrollParent:function(e){var i=this.css("position"),n="absolute"===i,r=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var e=t(this);return(!n||"static"!==e.css("position"))&&r.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==i&&o.length?o:t(this[0].ownerDocument||document)},uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,n){return!!t.data(e,n[3])},focusable:function(i){return e(i,!isNaN(t.attr(i,"tabindex")))},tabbable:function(i){var n=t.attr(i,"tabindex"),r=isNaN(n);return(r||n>=0)&&e(i,!r)}}),t("<a>").outerWidth(1).jquery||t.each(["Width","Height"],function(e,i){function n(e,i,n,o){return t.each(r,function(){i-=parseFloat(t.css(e,"padding"+this))||0,n&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),o&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var r="Width"===i?["Left","Right"]:["Top","Bottom"],o=i.toLowerCase(),s={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+i]=function(e){return void 0===e?s["inner"+i].call(this):this.each(function(){t(this).css(o,n(this,e)+"px")})},t.fn["outer"+i]=function(e,r){return"number"!=typeof e?s["outer"+i].call(this,e):this.each(function(){t(this).css(o,n(this,e,!0,r)+"px")})}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(t.fn.removeData=function(e){return function(i){return arguments.length?e.call(this,t.camelCase(i)):e.call(this)}}(t.fn.removeData)),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),t.fn.extend({focus:function(e){return function(i,n){return"number"==typeof i?this.each(function(){var e=this;setTimeout(function(){t(e).focus(),n&&n.call(e)},i)}):e.apply(this,arguments)}}(t.fn.focus),disableSelection:function(){var t="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(t+".ui-disableSelection",function(t){t.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(e){if(void 0!==e)return this.css("zIndex",e);if(this.length)for(var i,n,r=t(this[0]);r.length&&r[0]!==document;){if(i=r.css("position"),("absolute"===i||"relative"===i||"fixed"===i)&&(n=parseInt(r.css("zIndex"),10),!isNaN(n)&&0!==n))return n;r=r.parent()}return 0}}),t.ui.plugin={add:function(e,i,n){var r,o=t.ui[e].prototype;for(r in n)o.plugins[r]=o.plugins[r]||[],o.plugins[r].push([i,n[r]])},call:function(t,e,i,n){var r,o=t.plugins[e];if(o&&(n||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(r=0;r<o.length;r++)t.options[o[r][0]]&&o[r][1].apply(t.element,i)}}}),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(t){var e=0,i=Array.prototype.slice;return t.cleanData=function(e){return function(i){var n,r,o;for(o=0;null!=(r=i[o]);o++)try{n=t._data(r,"events"),n&&n.remove&&t(r).triggerHandler("remove")}catch(t){}e(i)}}(t.cleanData),t.widget=function(e,i,n){var r,o,s,a,l={},u=e.split(".")[0];return e=e.split(".")[1],r=u+"-"+e,n||(n=i,i=t.Widget),t.expr[":"][r.toLowerCase()]=function(e){return!!t.data(e,r)},t[u]=t[u]||{},o=t[u][e],s=t[u][e]=function(t,e){return this._createWidget?void(arguments.length&&this._createWidget(t,e)):new s(t,e)},t.extend(s,o,{version:n.version,_proto:t.extend({},n),_childConstructors:[]}),a=new i,a.options=t.widget.extend({},a.options),t.each(n,function(e,n){return t.isFunction(n)?void(l[e]=function(){var t=function(){return i.prototype[e].apply(this,arguments)},r=function(t){return i.prototype[e].apply(this,t)};return function(){var e,i=this._super,o=this._superApply;return this._super=t,this._superApply=r,e=n.apply(this,arguments),this._super=i,this._superApply=o,e}}()):void(l[e]=n)}),s.prototype=t.widget.extend(a,{widgetEventPrefix:o?a.widgetEventPrefix||e:e},l,{constructor:s,namespace:u,widgetName:e,widgetFullName:r}),o?(t.each(o._childConstructors,function(e,i){var n=i.prototype;t.widget(n.namespace+"."+n.widgetName,s,i._proto)}),delete o._childConstructors):i._childConstructors.push(s),t.widget.bridge(e,s),s},t.widget.extend=function(e){for(var n,r,o=i.call(arguments,1),s=0,a=o.length;s<a;s++)for(n in o[s])r=o[s][n],o[s].hasOwnProperty(n)&&void 0!==r&&(t.isPlainObject(r)?e[n]=t.isPlainObject(e[n])?t.widget.extend({},e[n],r):t.widget.extend({},r):e[n]=r);return e},t.widget.bridge=function(e,n){var r=n.prototype.widgetFullName||e;t.fn[e]=function(o){var s="string"==typeof o,a=i.call(arguments,1),l=this;return s?this.each(function(){var i,n=t.data(this,r);return"instance"===o?(l=n,!1):n?t.isFunction(n[o])&&"_"!==o.charAt(0)?(i=n[o].apply(n,a),i!==n&&void 0!==i?(l=i&&i.jquery?l.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+o+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; attempted to call method '"+o+"'")}):(a.length&&(o=t.widget.extend.apply(null,[o].concat(a))),this.each(function(){var e=t.data(this,r);e?(e.option(o||{}),e._init&&e._init()):t.data(this,r,new n(o,this))})),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(i,n){n=t(n||this.defaultElement||this)[0],this.element=t(n),this.uuid=e++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),n!==this&&(t.data(n,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===n&&this.destroy()}}),this.document=t(n.style?n.ownerDocument:n.document||n),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),i),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var n,r,o,s=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(s={},n=e.split("."),e=n.shift(),n.length){for(r=s[e]=t.widget.extend({},this.options[e]),o=0;o<n.length-1;o++)r[n[o]]=r[n[o]]||{},r=r[n[o]];if(e=n.pop(),1===arguments.length)return void 0===r[e]?null:r[e];r[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];s[e]=i}return this._setOptions(s),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!e),e&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(e,i,n){var r,o=this;"boolean"!=typeof e&&(n=i,i=e,e=!1),n?(i=r=t(i),this.bindings=this.bindings.add(i)):(n=i,i=this.element,r=this.widget()),t.each(n,function(n,s){function a(){if(e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled"))return("string"==typeof s?o[s]:s).apply(o,arguments)}"string"!=typeof s&&(a.guid=s.guid=s.guid||a.guid||t.guid++);var l=n.match(/^([\w:-]*)\s*(.*)$/),u=l[1]+o.eventNamespace,c=l[2];c?r.delegate(c,u,a):i.bind(u,a)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(i).undelegate(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?n[t]:t).apply(n,arguments)}var n=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){t(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){t(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){t(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){t(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,i,n){var r,o,s=this.options[e];if(n=n||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(r in o)r in i||(i[r]=o[r]);return this.element.trigger(i,n),!(t.isFunction(s)&&s.apply(this.element[0],[i].concat(n))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(n,r,o){"string"==typeof r&&(r={effect:r});var s,a=r?r===!0||"number"==typeof r?i:r.effect||i:e;r=r||{},"number"==typeof r&&(r={duration:r}),s=!t.isEmptyObject(r),r.complete=o,r.delay&&n.delay(r.delay),s&&t.effects&&t.effects.effect[a]?n[e](r):a!==e&&n[a]?n[a](r.duration,r.easing,o):n.queue(function(i){t(this)[e](),o&&o.call(n[0]),i()})}}),t.widget}),function(t){"function"==typeof define&&define.amd?define(["jquery","./core","./widget"],t):t(jQuery)}(function(t){return t.widget("ui.accordion",{version:"1.11.4",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var e=this.options;this.prevShow=this.prevHide=t(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),e.collapsible||e.active!==!1&&null!=e.active||(e.active=0),this._processPanels(),e.active<0&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():t()}},_createIcons:function(){var e=this.options.icons;e&&(t("<span>").addClass("ui-accordion-header-icon ui-icon "+e.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(e.header).addClass(e.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").removeUniqueId(),this._destroyIcons(),t=this.headers.next().removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").css("display","").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){return"active"===t?void this._activate(e):("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||this.options.active!==!1||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons()),void("disabled"===t&&(this.element.toggleClass("ui-state-disabled",!!e).attr("aria-disabled",e),this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!e))))},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var i=t.ui.keyCode,n=this.headers.length,r=this.headers.index(e.target),o=!1;switch(e.keyCode){case i.RIGHT:case i.DOWN:o=this.headers[(r+1)%n];break;case i.LEFT:case i.UP:o=this.headers[(r-1+n)%n];break;case i.SPACE:case i.ENTER:this._eventHandler(e);break;case i.HOME:o=this.headers[0];break;case i.END:o=this.headers[n-1]}o&&(t(e.target).attr("tabIndex",-1),t(o).attr("tabIndex",0),o.focus(),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===t.ui.keyCode.UP&&e.ctrlKey&&t(e.currentTarget).prev().focus()},refresh:function(){var e=this.options;this._processPanels(),e.active===!1&&e.collapsible===!0||!this.headers.length?(e.active=!1,this.active=t()):e.active===!1?this._activate(0):this.active.length&&!t.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=t()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var t=this.headers,e=this.panels;this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-state-default ui-corner-all"),this.panels=this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide(),e&&(this._off(t.not(this.headers)),this._off(e.not(this.panels)))},_refresh:function(){var e,i=this.options,n=i.heightStyle,r=this.element.parent();this.active=this._findActive(i.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(){var e=t(this),i=e.uniqueId().attr("id"),n=e.next(),r=n.uniqueId().attr("id");e.attr("aria-controls",r),n.attr("aria-labelledby",i)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(i.event),"fill"===n?(e=r.height(),this.element.siblings(":visible").each(function(){var i=t(this),n=i.css("position");"absolute"!==n&&"fixed"!==n&&(e-=i.outerHeight(!0))}),this.headers.each(function(){e-=t(this).outerHeight(!0)}),this.headers.next().each(function(){t(this).height(Math.max(0,e-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===n&&(e=0,this.headers.next().each(function(){e=Math.max(e,t(this).css("height","").height())}).height(e))},_activate:function(e){var i=this._findActive(e)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):t()},_setupEvents:function(e){var i={keydown:"_keydown"};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var i=this.options,n=this.active,r=t(e.currentTarget),o=r[0]===n[0],s=o&&i.collapsible,a=s?t():r.next(),l=n.next(),u={oldHeader:n,oldPanel:l,newHeader:s?t():r,newPanel:a};e.preventDefault(),o&&!i.collapsible||this._trigger("beforeActivate",e,u)===!1||(i.active=!s&&this.headers.index(r),this.active=o?t():r,this._toggle(u),n.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&n.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),o||(r.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&r.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),r.next().addClass("ui-accordion-content-active")))},_toggle:function(e){var i=e.newPanel,n=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=n,this.options.animate?this._animate(i,n,e):(n.hide(),i.show(),this._toggleComplete(e)),n.attr({"aria-hidden":"true"}),n.prev().attr({"aria-selected":"false","aria-expanded":"false"}),i.length&&n.length?n.prev().attr({tabIndex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter(function(){return 0===parseInt(t(this).attr("tabIndex"),10)}).attr("tabIndex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(t,e,i){var n,r,o,s=this,a=0,l=t.css("box-sizing"),u=t.length&&(!e.length||t.index()<e.index()),c=this.options.animate||{},h=u&&c.down||c,d=function(){s._toggleComplete(i)};return"number"==typeof h&&(o=h),"string"==typeof h&&(r=h),r=r||h.easing||c.easing,o=o||h.duration||c.duration,e.length?t.length?(n=t.show().outerHeight(),e.animate(this.hideProps,{duration:o,easing:r,step:function(t,e){e.now=Math.round(t)}}),void t.hide().animate(this.showProps,{duration:o,easing:r,complete:d,step:function(t,i){i.now=Math.round(t),"height"!==i.prop?"content-box"===l&&(a+=i.now):"content"!==s.options.heightStyle&&(i.now=Math.round(n-e.outerHeight()-a),a=0)}})):e.animate(this.hideProps,o,r,d):t.animate(this.showProps,o,r,d)},_toggleComplete:function(t){var e=t.oldPanel;e.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}})}),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(t){return function(){function e(t,e,i){return[parseFloat(t[0])*(p.test(t[0])?e/100:1),parseFloat(t[1])*(p.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function n(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var r,o,s=Math.max,a=Math.abs,l=Math.round,u=/left|center|right/,c=/top|center|bottom/,h=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,p=/%$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==r)return r;var e,i,n=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=n.children()[0];return t("body").append(n),e=o.offsetWidth,n.css("overflow","scroll"),i=o.offsetWidth,e===i&&(i=n[0].clientWidth),n.remove(),r=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),n=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),r="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,o="scroll"===n||"auto"===n&&e.height<e.element[0].scrollHeight;return{width:o?t.position.scrollbarWidth():0,height:r?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),n=t.isWindow(i[0]),r=!!i[0]&&9===i[0].nodeType;return{element:i,isWindow:n,isDocument:r,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:n||r?i.width():i.outerWidth(),height:n||r?i.height():i.outerHeight()}}},t.fn.position=function(r){if(!r||!r.of)return f.apply(this,arguments);r=t.extend({},r);var p,m,g,v,y,b,_=t(r.of),w=t.position.getWithinInfo(r.within),x=t.position.getScrollInfo(w),k=(r.collision||"flip").split(" "),C={};return b=n(_),_[0].preventDefault&&(r.at="left top"),m=b.width,g=b.height,v=b.offset,y=t.extend({},v),t.each(["my","at"],function(){var t,e,i=(r[this]||"").split(" ");1===i.length&&(i=u.test(i[0])?i.concat(["center"]):c.test(i[0])?["center"].concat(i):["center","center"]),i[0]=u.test(i[0])?i[0]:"center",i[1]=c.test(i[1])?i[1]:"center",t=h.exec(i[0]),e=h.exec(i[1]),C[this]=[t?t[0]:0,e?e[0]:0],r[this]=[d.exec(i[0])[0],d.exec(i[1])[0]]}),1===k.length&&(k[1]=k[0]),"right"===r.at[0]?y.left+=m:"center"===r.at[0]&&(y.left+=m/2),"bottom"===r.at[1]?y.top+=g:"center"===r.at[1]&&(y.top+=g/2),p=e(C.at,m,g),y.left+=p[0],y.top+=p[1],this.each(function(){var n,u,c=t(this),h=c.outerWidth(),d=c.outerHeight(),f=i(this,"marginLeft"),b=i(this,"marginTop"),M=h+f+i(this,"marginRight")+x.width,T=d+b+i(this,"marginBottom")+x.height,S=t.extend({},y),D=e(C.my,c.outerWidth(),c.outerHeight());"right"===r.my[0]?S.left-=h:"center"===r.my[0]&&(S.left-=h/2),"bottom"===r.my[1]?S.top-=d:"center"===r.my[1]&&(S.top-=d/2),S.left+=D[0],S.top+=D[1],o||(S.left=l(S.left),S.top=l(S.top)),n={marginLeft:f,marginTop:b},t.each(["left","top"],function(e,i){t.ui.position[k[e]]&&t.ui.position[k[e]][i](S,{targetWidth:m,targetHeight:g,elemWidth:h,elemHeight:d,collisionPosition:n,collisionWidth:M,collisionHeight:T,offset:[p[0]+D[0],p[1]+D[1]],my:r.my,at:r.at,within:w,elem:c})}),r.using&&(u=function(t){var e=v.left-S.left,i=e+m-h,n=v.top-S.top,o=n+g-d,l={target:{element:_,left:v.left,top:v.top,width:m,height:g},element:{element:c,left:S.left,top:S.top,width:h,height:d},horizontal:i<0?"left":e>0?"right":"center",vertical:o<0?"top":n>0?"bottom":"middle"};m<h&&a(e+i)<m&&(l.horizontal="center"),g<d&&a(n+o)<g&&(l.vertical="middle"),s(a(e),a(i))>s(a(n),a(o))?l.important="horizontal":l.important="vertical",r.using.call(this,t,l)}),c.offset(t.extend(S,{using:u}))})},t.ui.position={fit:{left:function(t,e){var i,n=e.within,r=n.isWindow?n.scrollLeft:n.offset.left,o=n.width,a=t.left-e.collisionPosition.marginLeft,l=r-a,u=a+e.collisionWidth-o-r;e.collisionWidth>o?l>0&&u<=0?(i=t.left+l+e.collisionWidth-o-r,t.left+=l-i):u>0&&l<=0?t.left=r:l>u?t.left=r+o-e.collisionWidth:t.left=r:l>0?t.left+=l:u>0?t.left-=u:t.left=s(t.left-a,t.left)},top:function(t,e){var i,n=e.within,r=n.isWindow?n.scrollTop:n.offset.top,o=e.within.height,a=t.top-e.collisionPosition.marginTop,l=r-a,u=a+e.collisionHeight-o-r;e.collisionHeight>o?l>0&&u<=0?(i=t.top+l+e.collisionHeight-o-r,t.top+=l-i):u>0&&l<=0?t.top=r:l>u?t.top=r+o-e.collisionHeight:t.top=r:l>0?t.top+=l:u>0?t.top-=u:t.top=s(t.top-a,t.top)}},flip:{left:function(t,e){var i,n,r=e.within,o=r.offset.left+r.scrollLeft,s=r.width,l=r.isWindow?r.scrollLeft:r.offset.left,u=t.left-e.collisionPosition.marginLeft,c=u-l,h=u+e.collisionWidth-s-l,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];c<0?(i=t.left+d+p+f+e.collisionWidth-s-o,(i<0||i<a(c))&&(t.left+=d+p+f)):h>0&&(n=t.left-e.collisionPosition.marginLeft+d+p+f-l,(n>0||a(n)<h)&&(t.left+=d+p+f))},top:function(t,e){var i,n,r=e.within,o=r.offset.top+r.scrollTop,s=r.height,l=r.isWindow?r.scrollTop:r.offset.top,u=t.top-e.collisionPosition.marginTop,c=u-l,h=u+e.collisionHeight-s-l,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,m=-2*e.offset[1];c<0?(n=t.top+p+f+m+e.collisionHeight-s-o,(n<0||n<a(c))&&(t.top+=p+f+m)):h>0&&(i=t.top-e.collisionPosition.marginTop+p+f+m-l,(i>0||a(i)<h)&&(t.top+=p+f+m))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}},function(){var e,i,n,r,s,a=document.getElementsByTagName("body")[0],l=document.createElement("div");e=document.createElement(a?"div":"body"),n={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},a&&t.extend(n,{position:"absolute",left:"-1000px",top:"-1000px"});for(s in n)e.style[s]=n[s];e.appendChild(l),i=a||document.documentElement,i.insertBefore(e,i.firstChild),l.style.cssText="position: absolute; left: 10.7432222px;",r=t(l).offset().left,o=r>10&&r<11,e.innerHTML="",i.removeChild(e)}()}(),t.ui.position}),function(t){"function"==typeof define&&define.amd?define(["jquery","./core","./widget","./position"],t):t(jQuery)}(function(t){return t.widget("ui.menu",{version:"1.11.4",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},items:"> *",menus:"ul",position:{my:"left-1 top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(e){var i=t(e.target);!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&t(this.document[0].activeElement).closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){if(!this.previousFilter){var i=t(e.currentTarget);i.siblings(".ui-state-active").removeClass("ui-state-active"),this.focus(e,i)}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){t.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-menu-icons ui-front").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").removeUniqueId().removeClass("ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var e=t(this);e.data("ui-menu-submenu-carat")&&e.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(e){var i,n,r,o,s=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:s=!1,n=this.previousFilter||"",r=String.fromCharCode(e.keyCode),o=!1,clearTimeout(this.filterTimer),r===n?o=!0:r=n+r,i=this._filterMenuItems(r),i=o&&i.index(this.active.next())!==-1?this.active.nextAll(".ui-menu-item"):i,i.length||(r=String.fromCharCode(e.keyCode),i=this._filterMenuItems(r)),i.length?(this.focus(e,i),this.previousFilter=r,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}s&&e.preventDefault()},_activate:function(t){this.active.is(".ui-state-disabled")||(this.active.is("[aria-haspopup='true']")?this.expand(t):this.select(t))},refresh:function(){var e,i,n=this,r=this.options.icons.submenu,o=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length),o.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-front").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),i=e.parent(),n=t("<span>").addClass("ui-menu-icon ui-icon "+r).data("ui-menu-submenu-carat",!0);i.attr("aria-haspopup","true").prepend(n),e.attr("aria-labelledby",i.attr("id"))}),e=o.add(this.element),i=e.find(this.options.items),i.not(".ui-menu-item").each(function(){var e=t(this);n._isDivider(e)&&e.addClass("ui-widget-content ui-menu-divider")}),i.not(".ui-menu-item, .ui-menu-divider").addClass("ui-menu-item").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),i.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){"icons"===t&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(e.submenu),"disabled"===t&&this.element.toggleClass("ui-state-disabled",!!e).attr("aria-disabled",e),this._super(t,e)},focus:function(t,e){var i,n;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),n=this.active.addClass("ui-state-focus").removeClass("ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",n.attr("id")),this.active.parent().closest(".ui-menu-item").addClass("ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,n,r,o,s,a;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,n=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,r=e.offset().top-this.activeMenu.offset().top-i-n,
o=this.activeMenu.scrollTop(),s=this.activeMenu.height(),a=e.outerHeight(),r<0?this.activeMenu.scrollTop(o+r):r+a>s&&this.activeMenu.scrollTop(o+r-s+a))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this.active.removeClass("ui-state-focus"),this.active=null,this._trigger("blur",t,{item:this.active}))},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var n=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));n.length||(n=this.element),this._close(n),this.blur(e),this.activeMenu=n},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find(".ui-state-active").not(".ui-state-focus").removeClass("ui-state-active")},_closeOnDocumentClick:function(e){return!t(e.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var n;this.active&&(n="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),n&&n.length&&this.active||(n=this.activeMenu.find(this.options.items)[e]()),this.focus(i,n)},nextPage:function(e){var i,n,r;return this.active?void(this.isLastItem()||(this._hasScroll()?(n=this.active.offset().top,r=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-n-r<0}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]()))):void this.next(e)},previousPage:function(e){var i,n,r;return this.active?void(this.isFirstItem()||(this._hasScroll()?(n=this.active.offset().top,r=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-n+r>0}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items).first()))):void this.next(e)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)},_filterMenuItems:function(e){var i=e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),n=new RegExp("^"+i,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return n.test(t.trim(t(this).text()))})}})}),function(t){"function"==typeof define&&define.amd?define(["jquery","./core","./widget","./position","./menu"],t):t(jQuery)}(function(t){return t.widget("ui.autocomplete",{version:"1.11.4",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var e,i,n,r=this.element[0].nodeName.toLowerCase(),o="textarea"===r,s="input"===r;this.isMultiLine=!!o||!s&&this.element.prop("isContentEditable"),this.valueMethod=this.element[o||s?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(r){if(this.element.prop("readOnly"))return e=!0,n=!0,void(i=!0);e=!1,n=!1,i=!1;var o=t.ui.keyCode;switch(r.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",r);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",r);break;case o.UP:e=!0,this._keyEvent("previous",r);break;case o.DOWN:e=!0,this._keyEvent("next",r);break;case o.ENTER:this.menu.active&&(e=!0,r.preventDefault(),this.menu.select(r));break;case o.TAB:this.menu.active&&this.menu.select(r);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(r),r.preventDefault());break;default:i=!0,this._searchTimeout(r)}},keypress:function(n){if(e)return e=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||n.preventDefault());if(!i){var r=t.ui.keyCode;switch(n.keyCode){case r.PAGE_UP:this._move("previousPage",n);break;case r.PAGE_DOWN:this._move("nextPage",n);break;case r.UP:this._keyEvent("previous",n);break;case r.DOWN:this._keyEvent("next",n)}}},input:function(t){return n?(n=!1,void t.preventDefault()):void this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?void delete this.cancelBlur:(clearTimeout(this.searching),this.close(t),void this._change(t))}}),this._initSource(),this.menu=t("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];t(e.target).closest(".ui-menu-item").length||this._delay(function(){var e=this;this.document.one("mousedown",function(n){n.target===e.element[0]||n.target===i||t.contains(i,n.target)||e.close()})})},menufocus:function(e,i){var n,r;return this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type))?(this.menu.blur(),void this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)})):(r=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:r})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(r.value),n=i.item.attr("aria-label")||r.value,void(n&&t.trim(n).length&&(this.liveRegion.children().hide(),t("<div>").text(n).appendTo(this.liveRegion))))},menuselect:function(t,e){var i=e.item.data("ui-autocomplete-item"),n=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=n,this._delay(function(){this.previous=n,this.selectedItem=i})),!1!==this._trigger("select",t,{item:i})&&this._value(i.value),this.term=this._value(),this.close(t),this.selectedItem=i}}),this.liveRegion=t("<span>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,n=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,n){n(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,r){n.xhr&&n.xhr.abort(),n.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){r(t)},error:function(){r([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),i=this.menu.element.is(":visible"),n=t.altKey||t.ctrlKey||t.metaKey||t.shiftKey;e&&(!e||i||n)||(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):this._trigger("search",e)!==!1?this._search(t):void 0},_search:function(t){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var e=++this.requestIndex;return t.proxy(function(t){e===this.requestIndex&&this.__response(t),this.pending--,this.pending||this.element.removeClass("ui-autocomplete-loading")},this)},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({},e,{label:e.label||e.value,value:e.value||e.label})})},_suggest:function(e){var i=this.menu.element.empty();this._renderMenu(i,e),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,i){var n=this;t.each(i,function(t,i){n._renderItemData(e,i)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,i){return t("<li>").text(i.label).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[t](e):void this.search(null,e)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(t,e),e.preventDefault())}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var n=new RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return n.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),t("<div>").text(i).appendTo(this.liveRegion))}}),t.ui.autocomplete}),function(t){"function"==typeof define&&define.amd?define(["jquery","./core","./widget"],t):t(jQuery)}(function(t){var e,i="ui-button ui-widget ui-state-default ui-corner-all",n="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",r=function(){var e=t(this);setTimeout(function(){e.find(":ui-button").button("refresh")},1)},o=function(e){var i=e.name,n=e.form,r=t([]);return i&&(i=i.replace(/'/g,"\\'"),r=n?t(n).find("[name='"+i+"'][type=radio]"):t("[name='"+i+"'][type=radio]",e.ownerDocument).filter(function(){return!this.form})),r};return t.widget("ui.button",{version:"1.11.4",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,r),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var n=this,s=this.options,a="checkbox"===this.type||"radio"===this.type,l=a?"":"ui-state-active";null===s.label&&(s.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(i).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){s.disabled||this===e&&t(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){s.disabled||t(this).removeClass(l)}).bind("click"+this.eventNamespace,function(t){s.disabled&&(t.preventDefault(),t.stopImmediatePropagation())}),this._on({focus:function(){this.buttonElement.addClass("ui-state-focus")},blur:function(){this.buttonElement.removeClass("ui-state-focus")}}),a&&this.element.bind("change"+this.eventNamespace,function(){n.refresh()}),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(s.disabled)return!1}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(s.disabled)return!1;t(this).addClass("ui-state-active"),n.buttonElement.attr("aria-pressed","true");var e=n.element[0];o(e).not(e).map(function(){return t(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return!s.disabled&&(t(this).addClass("ui-state-active"),e=this,void n.document.one("mouseup",function(){e=null}))}).bind("mouseup"+this.eventNamespace,function(){return!s.disabled&&void t(this).removeClass("ui-state-active")}).bind("keydown"+this.eventNamespace,function(e){return!s.disabled&&void(e.keyCode!==t.ui.keyCode.SPACE&&e.keyCode!==t.ui.keyCode.ENTER||t(this).addClass("ui-state-active"))}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){t(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(e){e.keyCode===t.ui.keyCode.SPACE&&t(this).click()})),this._setOption("disabled",s.disabled),this._resetButton()},_determineButtonType:function(){var t,e,i;this.element.is("[type=checkbox]")?this.type="checkbox":this.element.is("[type=radio]")?this.type="radio":this.element.is("input")?this.type="input":this.type="button","checkbox"===this.type||"radio"===this.type?(t=this.element.parents().last(),e="label[for='"+this.element.attr("id")+"']",this.buttonElement=t.find(e),this.buttonElement.length||(t=t.length?t.siblings():this.element.siblings(),this.buttonElement=t.filter(e),this.buttonElement.length||(this.buttonElement=t.find(e))),this.element.addClass("ui-helper-hidden-accessible"),i=this.element.is(":checked"),i&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(i+" ui-state-active "+n).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(t,e){return this._super(t,e),"disabled"===t?(this.widget().toggleClass("ui-state-disabled",!!e),this.element.prop("disabled",!!e),void(e&&("checkbox"===this.type||"radio"===this.type?this.buttonElement.removeClass("ui-state-focus"):this.buttonElement.removeClass("ui-state-focus ui-state-active")))):void this._resetButton()},refresh:function(){var e=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");e!==this.options.disabled&&this._setOption("disabled",e),"radio"===this.type?o(this.element[0]).each(function(){t(this).is(":checked")?t(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):t(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return void(this.options.label&&this.element.val(this.options.label));var e=this.buttonElement.removeClass(n),i=t("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(e.empty()).text(),r=this.options.icons,o=r.primary&&r.secondary,s=[];r.primary||r.secondary?(this.options.text&&s.push("ui-button-text-icon"+(o?"s":r.primary?"-primary":"-secondary")),r.primary&&e.prepend("<span class='ui-button-icon-primary ui-icon "+r.primary+"'></span>"),r.secondary&&e.append("<span class='ui-button-icon-secondary ui-icon "+r.secondary+"'></span>"),this.options.text||(s.push(o?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||e.attr("title",t.trim(i)))):s.push("ui-button-text-only"),e.addClass(s.join(" "))}}),t.widget("ui.buttonset",{version:"1.11.4",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(t,e){"disabled"===t&&this.buttons.button("option",t,e),this._super(t,e)},refresh:function(){var e="rtl"===this.element.css("direction"),i=this.element.find(this.options.items),n=i.filter(":ui-button");i.not(":ui-button").button(),n.button("refresh"),this.buttons=i.map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(e?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(e?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}}),t.ui.button}),function(t){"function"==typeof define&&define.amd?define(["jquery","./core"],t):t(jQuery)}(function(t){function e(t){for(var e,i;t.length&&t[0]!==document;){if(e=t.css("position"),("absolute"===e||"relative"===e||"fixed"===e)&&(i=parseInt(t.css("zIndex"),10),!isNaN(i)&&0!==i))return i;t=t.parent()}return 0}function i(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.regional.en=t.extend(!0,{},this.regional[""]),this.regional["en-US"]=t.extend(!0,{},this.regional.en),this.dpDiv=n(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function n(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.delegate(i,"mouseout",function(){t(this).removeClass("ui-state-hover"),this.className.indexOf("ui-datepicker-prev")!==-1&&t(this).removeClass("ui-datepicker-prev-hover"),this.className.indexOf("ui-datepicker-next")!==-1&&t(this).removeClass("ui-datepicker-next-hover")}).delegate(i,"mouseover",r)}function r(){t.datepicker._isDisabledDatepicker(s.inline?s.dpDiv.parent()[0]:s.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),this.className.indexOf("ui-datepicker-prev")!==-1&&t(this).addClass("ui-datepicker-prev-hover"),this.className.indexOf("ui-datepicker-next")!==-1&&t(this).addClass("ui-datepicker-next-hover"))}function o(e,i){t.extend(e,i);for(var n in i)null==i[n]&&(e[n]=i[n]);return e}t.extend(t.ui,{datepicker:{version:"1.11.4"}});var s;return t.extend(i.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return o(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var n,r,o;n=e.nodeName.toLowerCase(),r="div"===n||"span"===n,e.id||(this.uuid+=1,e.id="dp"+this.uuid),o=this._newInst(t(e),r),o.settings=t.extend({},i||{}),"input"===n?this._connectDatepicker(e,o):r&&this._inlineDatepicker(e,o)},_newInst:function(e,i){var r=e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:r,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?n(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,i){var n=t(e);i.append=t([]),i.trigger=t([]),n.hasClass(this.markerClassName)||(this._attachments(n,i),n.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(i),t.data(e,"datepicker",i),i.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var n,r,o,s=this._get(i,"appendText"),a=this._get(i,"isRTL");i.append&&i.append.remove(),s&&(i.append=t("<span class='"+this._appendClass+"'>"+s+"</span>"),e[a?"before":"after"](i.append)),e.unbind("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),n=this._get(i,"showOn"),"focus"!==n&&"both"!==n||e.focus(this._showDatepicker),"button"!==n&&"both"!==n||(r=this._get(i,"buttonText"),o=this._get(i,"buttonImage"),i.trigger=t(this._get(i,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:o,alt:r,title:r}):t("<button type='button'></button>").addClass(this._triggerClass).html(o?t("<img/>").attr({src:o,alt:r,title:r}):r)),e[a?"before":"after"](i.trigger),i.trigger.click(function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,n,r,o=new Date(2009,11,20),s=this._get(t,"dateFormat");s.match(/[DM]/)&&(e=function(t){for(i=0,n=0,r=0;r<t.length;r++)t[r].length>i&&(i=t[r].length,n=r);return n},o.setMonth(e(this._get(t,s.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,s.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length)}},_inlineDatepicker:function(e,i){var n=t(e);n.hasClass(this.markerClassName)||(n.addClass(this.markerClassName).append(i.dpDiv),t.data(e,"datepicker",i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,n,r,s){var a,l,u,c,h,d=this._dialogInst;return d||(this.uuid+=1,a="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+a+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),t("body").append(this._dialogInput),d=this._dialogInst=this._newInst(this._dialogInput,!1),d.settings={},t.data(this._dialogInput[0],"datepicker",d)),o(d.settings,r||{}),i=i&&i.constructor===Date?this._formatDate(d,i):i,this._dialogInput.val(i),this._pos=s?s.length?s:[s.pageX,s.pageY]:null,this._pos||(l=document.documentElement.clientWidth,u=document.documentElement.clientHeight,c=document.documentElement.scrollLeft||document.body.scrollLeft,h=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[l/2-100+c,u/2-150+h]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),d.settings.onSelect=n,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],"datepicker",d),this},_destroyDatepicker:function(e){var i,n=t(e),r=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,"datepicker"),"input"===i?(r.append.remove(),r.trigger.remove(),n.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):"div"!==i&&"span"!==i||n.removeClass(this.markerClassName).empty(),s===r&&(s=null))},_enableDatepicker:function(e){var i,n,r=t(e),o=t.data(e,"datepicker");r.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!1,o.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==i&&"span"!==i||(n=r.children("."+this._inlineClass),n.children().removeClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var i,n,r=t(e),o=t.data(e,"datepicker");r.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!0,o.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==i&&"span"!==i||(n=r.children("."+this._inlineClass),n.children().addClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;e<this._disabledInputs.length;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,"datepicker")}catch(t){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,i,n){var r,s,a,l,u=this._getInst(e);return 2===arguments.length&&"string"==typeof i?"defaults"===i?t.extend({},t.datepicker._defaults):u?"all"===i?t.extend({},u.settings):this._get(u,i):null:(r=i||{},"string"==typeof i&&(r={},r[i]=n),void(u&&(this._curInst===u&&this._hideDatepicker(),s=this._getDateDatepicker(e,!0),a=this._getMinMaxDate(u,"min"),l=this._getMinMaxDate(u,"max"),o(u.settings,r),null!==a&&void 0!==r.dateFormat&&void 0===r.minDate&&(u.settings.minDate=this._formatDate(u,a)),null!==l&&void 0!==r.dateFormat&&void 0===r.maxDate&&(u.settings.maxDate=this._formatDate(u,l)),"disabled"in r&&(r.disabled?this._disableDatepicker(e):this._enableDatepicker(e)),this._attachments(t(e),u),this._autoSize(u),this._setDate(u,s),this._updateAlternate(u),this._updateDatepicker(u))))},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!i.inline&&this._setDateFromField(i,e),i?this._getDate(i):null},_doKeyDown:function(e){var i,n,r,o=t.datepicker._getInst(e.target),s=!0,a=o.dpDiv.is(".ui-datepicker-rtl");if(o._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),s=!1;break;case 13:return r=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",o.dpDiv),r[0]&&t.datepicker._selectDay(e.target,o.selectedMonth,o.selectedYear,r[0]),i=t.datepicker._get(o,"onSelect"),i?(n=t.datepicker._formatDate(o),i.apply(o.input?o.input[0]:null,[n,o])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),s=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),s=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,a?1:-1,"D"),s=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),s=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,a?-1:1,"D"),s=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),s=e.ctrlKey||e.metaKey;break;default:s=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):s=!1;s&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var i,n,r=t.datepicker._getInst(e.target);if(t.datepicker._get(r,"constrainInput"))return i=t.datepicker._possibleChars(t.datepicker._get(r,"dateFormat")),n=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||n<" "||!i||i.indexOf(n)>-1},_doKeyUp:function(e){var i,n=t.datepicker._getInst(e.target);if(n.input.val()!==n.lastVal)try{i=t.datepicker.parseDate(t.datepicker._get(n,"dateFormat"),n.input?n.input.val():null,t.datepicker._getFormatConfig(n)),i&&(t.datepicker._setDateFromField(n),t.datepicker._updateAlternate(n),t.datepicker._updateDatepicker(n))}catch(t){}return!0},_showDatepicker:function(i){if(i=i.target||i,"input"!==i.nodeName.toLowerCase()&&(i=t("input",i.parentNode)[0]),!t.datepicker._isDisabledDatepicker(i)&&t.datepicker._lastInput!==i){var n,r,s,a,l,u,c;n=t.datepicker._getInst(i),t.datepicker._curInst&&t.datepicker._curInst!==n&&(t.datepicker._curInst.dpDiv.stop(!0,!0),n&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),r=t.datepicker._get(n,"beforeShow"),s=r?r.apply(i,[i,n]):{},s!==!1&&(o(n.settings,s),n.lastVal=null,t.datepicker._lastInput=i,t.datepicker._setDateFromField(n),t.datepicker._inDialog&&(i.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(i),t.datepicker._pos[1]+=i.offsetHeight),a=!1,t(i).parents().each(function(){return a|="fixed"===t(this).css("position"),!a}),l={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,n.dpDiv.empty(),n.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(n),l=t.datepicker._checkOffset(n,l,a),n.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":a?"fixed":"absolute",display:"none",left:l.left+"px",top:l.top+"px"}),n.inline||(u=t.datepicker._get(n,"showAnim"),c=t.datepicker._get(n,"duration"),n.dpDiv.css("z-index",e(t(i))+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[u]?n.dpDiv.show(u,t.datepicker._get(n,"showOptions"),c):n.dpDiv[u||"show"](u?c:null),
t.datepicker._shouldFocusInput(n)&&n.input.focus(),t.datepicker._curInst=n))}},_updateDatepicker:function(e){this.maxRows=4,s=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var i,n=this._getNumberOfMonths(e),o=n[1],a=17,l=e.dpDiv.find("."+this._dayOverClass+" a");l.length>0&&r.apply(l.get(0)),e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),o>1&&e.dpDiv.addClass("ui-datepicker-multi-"+o).css("width",a*o+"em"),e.dpDiv[(1!==n[0]||1!==n[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(e)&&e.input.focus(),e.yearshtml&&(i=e.yearshtml,setTimeout(function(){i===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),i=e.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,i,n){var r=e.dpDiv.outerWidth(),o=e.dpDiv.outerHeight(),s=e.input?e.input.outerWidth():0,a=e.input?e.input.outerHeight():0,l=document.documentElement.clientWidth+(n?0:t(document).scrollLeft()),u=document.documentElement.clientHeight+(n?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?r-s:0,i.left-=n&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=n&&i.top===e.input.offset().top+a?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+r>l&&l>r?Math.abs(i.left+r-l):0),i.top-=Math.min(i.top,i.top+o>u&&u>o?Math.abs(o+a):0),i},_findPos:function(e){for(var i,n=this._getInst(e),r=this._get(n,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[r?"previousSibling":"nextSibling"];return i=t(e).offset(),[i.left,i.top]},_hideDatepicker:function(e){var i,n,r,o,s=this._curInst;!s||e&&s!==t.data(e,"datepicker")||this._datepickerShowing&&(i=this._get(s,"showAnim"),n=this._get(s,"duration"),r=function(){t.datepicker._tidyDialog(s)},t.effects&&(t.effects.effect[i]||t.effects[i])?s.dpDiv.hide(i,t.datepicker._get(s,"showOptions"),n,r):s.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?n:null,r),i||r(),this._datepickerShowing=!1,o=this._get(s,"onClose"),o&&o.apply(s.input?s.input[0]:null,[s.input?s.input.val():"",s]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),n=t.datepicker._getInst(i[0]);(i[0].id===t.datepicker._mainDivId||0!==i.parents("#"+t.datepicker._mainDivId).length||i.hasClass(t.datepicker.markerClassName)||i.closest("."+t.datepicker._triggerClass).length||!t.datepicker._datepickerShowing||t.datepicker._inDialog&&t.blockUI)&&(!i.hasClass(t.datepicker.markerClassName)||t.datepicker._curInst===n)||t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,n){var r=t(e),o=this._getInst(r[0]);this._isDisabledDatepicker(r[0])||(this._adjustInstDate(o,i+("M"===n?this._get(o,"showCurrentAtPos"):0),n),this._updateDatepicker(o))},_gotoToday:function(e){var i,n=t(e),r=this._getInst(n[0]);this._get(r,"gotoCurrent")&&r.currentDay?(r.selectedDay=r.currentDay,r.drawMonth=r.selectedMonth=r.currentMonth,r.drawYear=r.selectedYear=r.currentYear):(i=new Date,r.selectedDay=i.getDate(),r.drawMonth=r.selectedMonth=i.getMonth(),r.drawYear=r.selectedYear=i.getFullYear()),this._notifyChange(r),this._adjustDate(n)},_selectMonthYear:function(e,i,n){var r=t(e),o=this._getInst(r[0]);o["selected"+("M"===n?"Month":"Year")]=o["draw"+("M"===n?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(r)},_selectDay:function(e,i,n,r){var o,s=t(e);t(r).hasClass(this._unselectableClass)||this._isDisabledDatepicker(s[0])||(o=this._getInst(s[0]),o.selectedDay=o.currentDay=t("a",r).html(),o.selectedMonth=o.currentMonth=i,o.selectedYear=o.currentYear=n,this._selectDate(e,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var n,r=t(e),o=this._getInst(r[0]);i=null!=i?i:this._formatDate(o),o.input&&o.input.val(i),this._updateAlternate(o),n=this._get(o,"onSelect"),n?n.apply(o.input?o.input[0]:null,[i,o]):o.input&&o.input.trigger("change"),o.inline?this._updateDatepicker(o):(this._hideDatepicker(),this._lastInput=o.input[0],"object"!=typeof o.input[0]&&o.input.focus(),this._lastInput=null)},_updateAlternate:function(e){var i,n,r,o=this._get(e,"altField");o&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),n=this._getDate(e),r=this.formatDate(i,n,this._getFormatConfig(e)),t(o).each(function(){t(this).val(r)}))},noWeekends:function(t){var e=t.getDay();return[e>0&&e<6,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(e,i,n){if(null==e||null==i)throw"Invalid arguments";if(i="object"==typeof i?i.toString():i+"",""===i)return null;var r,o,s,a,l=0,u=(n?n.shortYearCutoff:null)||this._defaults.shortYearCutoff,c="string"!=typeof u?u:(new Date).getFullYear()%100+parseInt(u,10),h=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,d=(n?n.dayNames:null)||this._defaults.dayNames,p=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,f=(n?n.monthNames:null)||this._defaults.monthNames,m=-1,g=-1,v=-1,y=-1,b=!1,_=function(t){var i=r+1<e.length&&e.charAt(r+1)===t;return i&&r++,i},w=function(t){var e=_(t),n="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,r="y"===t?n:1,o=new RegExp("^\\d{"+r+","+n+"}"),s=i.substring(l).match(o);if(!s)throw"Missing number at position "+l;return l+=s[0].length,parseInt(s[0],10)},x=function(e,n,r){var o=-1,s=t.map(_(e)?r:n,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(s,function(t,e){var n=e[1];if(i.substr(l,n.length).toLowerCase()===n.toLowerCase())return o=e[0],l+=n.length,!1}),o!==-1)return o+1;throw"Unknown name at position "+l},k=function(){if(i.charAt(l)!==e.charAt(r))throw"Unexpected literal at position "+l;l++};for(r=0;r<e.length;r++)if(b)"'"!==e.charAt(r)||_("'")?k():b=!1;else switch(e.charAt(r)){case"d":v=w("d");break;case"D":x("D",h,d);break;case"o":y=w("o");break;case"m":g=w("m");break;case"M":g=x("M",p,f);break;case"y":m=w("y");break;case"@":a=new Date(w("@")),m=a.getFullYear(),g=a.getMonth()+1,v=a.getDate();break;case"!":a=new Date((w("!")-this._ticksTo1970)/1e4),m=a.getFullYear(),g=a.getMonth()+1,v=a.getDate();break;case"'":_("'")?k():b=!0;break;default:k()}if(l<i.length&&(s=i.substr(l),!/^\s+/.test(s)))throw"Extra/unparsed characters found in date: "+s;if(m===-1?m=(new Date).getFullYear():m<100&&(m+=(new Date).getFullYear()-(new Date).getFullYear()%100+(m<=c?0:-100)),y>-1)for(g=1,v=y;;){if(o=this._getDaysInMonth(m,g-1),v<=o)break;g++,v-=o}if(a=this._daylightSavingAdjust(new Date(m,g-1,v)),a.getFullYear()!==m||a.getMonth()+1!==g||a.getDate()!==v)throw"Invalid date";return a},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(t,e,i){if(!e)return"";var n,r=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,o=(i?i.dayNames:null)||this._defaults.dayNames,s=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,a=(i?i.monthNames:null)||this._defaults.monthNames,l=function(e){var i=n+1<t.length&&t.charAt(n+1)===e;return i&&n++,i},u=function(t,e,i){var n=""+e;if(l(t))for(;n.length<i;)n="0"+n;return n},c=function(t,e,i,n){return l(t)?n[e]:i[e]},h="",d=!1;if(e)for(n=0;n<t.length;n++)if(d)"'"!==t.charAt(n)||l("'")?h+=t.charAt(n):d=!1;else switch(t.charAt(n)){case"d":h+=u("d",e.getDate(),2);break;case"D":h+=c("D",e.getDay(),r,o);break;case"o":h+=u("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":h+=u("m",e.getMonth()+1,2);break;case"M":h+=c("M",e.getMonth(),s,a);break;case"y":h+=l("y")?e.getFullYear():(e.getYear()%100<10?"0":"")+e.getYear()%100;break;case"@":h+=e.getTime();break;case"!":h+=1e4*e.getTime()+this._ticksTo1970;break;case"'":l("'")?h+="'":d=!0;break;default:h+=t.charAt(n)}return h},_possibleChars:function(t){var e,i="",n=!1,r=function(i){var n=e+1<t.length&&t.charAt(e+1)===i;return n&&e++,n};for(e=0;e<t.length;e++)if(n)"'"!==t.charAt(e)||r("'")?i+=t.charAt(e):n=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":r("'")?i+="'":n=!0;break;default:i+=t.charAt(e)}return i},_get:function(t,e){return void 0!==t.settings[e]?t.settings[e]:this._defaults[e]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),n=t.lastVal=t.input?t.input.val():null,r=this._getDefaultDate(t),o=r,s=this._getFormatConfig(t);try{o=this.parseDate(i,n,s)||r}catch(t){n=e?"":n}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=n?o.getDate():0,t.currentMonth=n?o.getMonth():0,t.currentYear=n?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,i,n){var r=function(t){var e=new Date;return e.setDate(e.getDate()+t),e},o=function(i){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),i,t.datepicker._getFormatConfig(e))}catch(t){}for(var n=(i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,r=n.getFullYear(),o=n.getMonth(),s=n.getDate(),a=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=a.exec(i);l;){switch(l[2]||"d"){case"d":case"D":s+=parseInt(l[1],10);break;case"w":case"W":s+=7*parseInt(l[1],10);break;case"m":case"M":o+=parseInt(l[1],10),s=Math.min(s,t.datepicker._getDaysInMonth(r,o));break;case"y":case"Y":r+=parseInt(l[1],10),s=Math.min(s,t.datepicker._getDaysInMonth(r,o))}l=a.exec(i)}return new Date(r,o,s)},s=null==i||""===i?n:"string"==typeof i?o(i):"number"==typeof i?isNaN(i)?n:r(i):new Date(i.getTime());return s=s&&"Invalid Date"===s.toString()?n:s,s&&(s.setHours(0),s.setMinutes(0),s.setSeconds(0),s.setMilliseconds(0)),this._daylightSavingAdjust(s)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var n=!e,r=t.selectedMonth,o=t.selectedYear,s=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=s.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=s.getMonth(),t.drawYear=t.selectedYear=t.currentYear=s.getFullYear(),r===t.selectedMonth&&o===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(n?"":this._formatDate(t))},_getDate:function(t){var e=!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return e},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),n="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(n,-i,"M")},next:function(){t.datepicker._adjustDate(n,+i,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(n)},selectDay:function(){return t.datepicker._selectDay(n,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(n,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(n,this,"Y"),!1}};t(this).bind(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,n,r,o,s,a,l,u,c,h,d,p,f,m,g,v,y,b,_,w,x,k,C,M,T,S,D,L,A,E,I,P,O,j,N,Y,H,F,R=new Date,W=this._daylightSavingAdjust(new Date(R.getFullYear(),R.getMonth(),R.getDate())),z=this._get(t,"isRTL"),B=this._get(t,"showButtonPanel"),$=this._get(t,"hideIfNoPrevNext"),q=this._get(t,"navigationAsDateFormat"),U=this._getNumberOfMonths(t),V=this._get(t,"showCurrentAtPos"),G=this._get(t,"stepMonths"),X=1!==U[0]||1!==U[1],J=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),K=this._getMinMaxDate(t,"min"),Q=this._getMinMaxDate(t,"max"),Z=t.drawMonth-V,tt=t.drawYear;if(Z<0&&(Z+=12,tt--),Q)for(e=this._daylightSavingAdjust(new Date(Q.getFullYear(),Q.getMonth()-U[0]*U[1]+1,Q.getDate())),e=K&&e<K?K:e;this._daylightSavingAdjust(new Date(tt,Z,1))>e;)Z--,Z<0&&(Z=11,tt--);for(t.drawMonth=Z,t.drawYear=tt,i=this._get(t,"prevText"),i=q?this.formatDate(i,this._daylightSavingAdjust(new Date(tt,Z-G,1)),this._getFormatConfig(t)):i,n=this._canAdjustMonth(t,-1,tt,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(z?"e":"w")+"'>"+i+"</span></a>":$?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(z?"e":"w")+"'>"+i+"</span></a>",r=this._get(t,"nextText"),r=q?this.formatDate(r,this._daylightSavingAdjust(new Date(tt,Z+G,1)),this._getFormatConfig(t)):r,o=this._canAdjustMonth(t,1,tt,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+r+"'><span class='ui-icon ui-icon-circle-triangle-"+(z?"w":"e")+"'>"+r+"</span></a>":$?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+r+"'><span class='ui-icon ui-icon-circle-triangle-"+(z?"w":"e")+"'>"+r+"</span></a>",s=this._get(t,"currentText"),a=this._get(t,"gotoCurrent")&&t.currentDay?J:W,s=q?this.formatDate(s,a,this._getFormatConfig(t)):s,l=t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</button>",u=B?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(z?l:"")+(this._isInRange(t,a)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+s+"</button>":"")+(z?"":l)+"</div>":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?0:c,h=this._get(t,"showWeek"),d=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),m=this._get(t,"monthNamesShort"),g=this._get(t,"beforeShowDay"),v=this._get(t,"showOtherMonths"),y=this._get(t,"selectOtherMonths"),b=this._getDefaultDate(t),_="",x=0;x<U[0];x++){for(k="",this.maxRows=4,C=0;C<U[1];C++){if(M=this._daylightSavingAdjust(new Date(tt,Z,t.selectedDay)),T=" ui-corner-all",S="",X){if(S+="<div class='ui-datepicker-group",U[1]>1)switch(C){case 0:S+=" ui-datepicker-group-first",T=" ui-corner-"+(z?"right":"left");break;case U[1]-1:S+=" ui-datepicker-group-last",T=" ui-corner-"+(z?"left":"right");break;default:S+=" ui-datepicker-group-middle",T=""}S+="'>"}for(S+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+T+"'>"+(/all|left/.test(T)&&0===x?z?o:n:"")+(/all|right/.test(T)&&0===x?z?n:o:"")+this._generateMonthYearHeader(t,Z,tt,K,Q,x>0||C>0,f,m)+"</div><table class='ui-datepicker-calendar'><thead><tr>",D=h?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",w=0;w<7;w++)L=(w+c)%7,D+="<th scope='col'"+((w+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+d[L]+"'>"+p[L]+"</span></th>";for(S+=D+"</tr></thead><tbody>",A=this._getDaysInMonth(tt,Z),tt===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,A)),E=(this._getFirstDayOfMonth(tt,Z)-c+7)%7,I=Math.ceil((E+A)/7),P=X&&this.maxRows>I?this.maxRows:I,this.maxRows=P,O=this._daylightSavingAdjust(new Date(tt,Z,1-E)),j=0;j<P;j++){for(S+="<tr>",N=h?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(O)+"</td>":"",w=0;w<7;w++)Y=g?g.apply(t.input?t.input[0]:null,[O]):[!0,""],H=O.getMonth()!==Z,F=H&&!y||!Y[0]||K&&O<K||Q&&O>Q,N+="<td class='"+((w+c+6)%7>=5?" ui-datepicker-week-end":"")+(H?" ui-datepicker-other-month":"")+(O.getTime()===M.getTime()&&Z===t.selectedMonth&&t._keyEvent||b.getTime()===O.getTime()&&b.getTime()===M.getTime()?" "+this._dayOverClass:"")+(F?" "+this._unselectableClass+" ui-state-disabled":"")+(H&&!v?"":" "+Y[1]+(O.getTime()===J.getTime()?" "+this._currentClass:"")+(O.getTime()===W.getTime()?" ui-datepicker-today":""))+"'"+(H&&!v||!Y[2]?"":" title='"+Y[2].replace(/'/g,"&#39;")+"'")+(F?"":" data-handler='selectDay' data-event='click' data-month='"+O.getMonth()+"' data-year='"+O.getFullYear()+"'")+">"+(H&&!v?"&#xa0;":F?"<span class='ui-state-default'>"+O.getDate()+"</span>":"<a class='ui-state-default"+(O.getTime()===W.getTime()?" ui-state-highlight":"")+(O.getTime()===J.getTime()?" ui-state-active":"")+(H?" ui-priority-secondary":"")+"' href='#'>"+O.getDate()+"</a>")+"</td>",O.setDate(O.getDate()+1),O=this._daylightSavingAdjust(O);S+=N+"</tr>"}Z++,Z>11&&(Z=0,tt++),S+="</tbody></table>"+(X?"</div>"+(U[0]>0&&C===U[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),k+=S}_+=k}return _+=u,t._keyEvent=!1,_},_generateMonthYearHeader:function(t,e,i,n,r,o,s,a){var l,u,c,h,d,p,f,m,g=this._get(t,"changeMonth"),v=this._get(t,"changeYear"),y=this._get(t,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",_="";if(o||!g)_+="<span class='ui-datepicker-month'>"+s[e]+"</span>";else{for(l=n&&n.getFullYear()===i,u=r&&r.getFullYear()===i,_+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;c<12;c++)(!l||c>=n.getMonth())&&(!u||c<=r.getMonth())&&(_+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+a[c]+"</option>");_+="</select>"}if(y||(b+=_+(!o&&g&&v?"":"&#xa0;")),!t.yearshtml)if(t.yearshtml="",o||!v)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(h=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);return isNaN(e)?d:e},f=p(h[0]),m=Math.max(f,p(h[1]||"")),f=n?Math.max(f,n.getFullYear()):f,m=r?Math.min(m,r.getFullYear()):m,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";f<=m;f++)t.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";t.yearshtml+="</select>",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),y&&(b+=(!o&&g&&v?"":"&#xa0;")+_),b+="</div>"},_adjustInstDate:function(t,e,i){var n=t.drawYear+("Y"===i?e:0),r=t.drawMonth+("M"===i?e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(n,r))+("D"===i?e:0),s=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(n,r,o)));t.selectedDay=s.getDate(),t.drawMonth=t.selectedMonth=s.getMonth(),t.drawYear=t.selectedYear=s.getFullYear(),"M"!==i&&"Y"!==i||this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),n=this._getMinMaxDate(t,"max"),r=i&&e<i?i:e;return n&&r>n?n:r},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,n){var r=this._getNumberOfMonths(t),o=this._daylightSavingAdjust(new Date(i,n+(e<0?e:r[0]*r[1]),1));return e<0&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(t,o)},_isInRange:function(t,e){var i,n,r=this._getMinMaxDate(t,"min"),o=this._getMinMaxDate(t,"max"),s=null,a=null,l=this._get(t,"yearRange");return l&&(i=l.split(":"),n=(new Date).getFullYear(),s=parseInt(i[0],10),a=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(s+=n),i[1].match(/[+\-].*/)&&(a+=n)),(!r||e.getTime()>=r.getTime())&&(!o||e.getTime()<=o.getTime())&&(!s||e.getFullYear()>=s)&&(!a||e.getFullYear()<=a)},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),{shortYearCutoff:e,dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,n){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var r=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(n,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),r,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).mousedown(t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new i,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.11.4",t.datepicker}),function(t){"function"==typeof define&&define.amd?define(["jquery","./widget"],t):t(jQuery)}(function(t){var e=!1;return t(document).mouseup(function(){e=!1}),t.widget("ui.mouse",{version:"1.11.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.bind("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).bind("click."+this.widgetName,function(i){if(!0===t.data(i.target,e.widgetName+".preventClickEvent"))return t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!e){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var n=this,r=1===i.which,o=!("string"!=typeof this.options.cancel||!i.target.nodeName)&&t(i.target).closest(this.options.cancel).length;return!(r&&!o&&this._mouseCapture(i))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){n.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):(!0===t.data(i.target,this.widgetName+".preventClickEvent")&&t.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return n._mouseMove(t)},this._mouseUpDelegate=function(t){return n._mouseUp(t)},this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),e=!0,!0))}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||document.documentMode<9)&&!e.button)return this._mouseUp(e);if(!e.which)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(i){return this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,i.target===this._mouseDownEvent.target&&t.data(i.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(i)),e=!1,!1},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}),function(t){"function"==typeof define&&define.amd?define(["jquery","./core","./mouse","./widget"],t):t(jQuery)}(function(t){return t.widget("ui.draggable",t.ui.mouse,{version:"1.11.4",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?void(this.destroyOnClear=!0):(this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._removeHandleClassName(),void this._mouseDestroy())},_mouseCapture:function(e){var i=this.options;return this._blurActiveElement(e),!(this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0)&&(this.handle=this._getHandle(e),!!this.handle&&(this._blockFrames(i.iframeFix===!0?"iframe":i.iframeFix),!0))},_blockFrames:function(e){this.iframeBlocks=this.document.find(e).map(function(){var e=t(this);return t("<div>").css("position","absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(e){var i=this.document[0];if(this.handleElement.is(e.target))try{i.activeElement&&"body"!==i.activeElement.nodeName.toLowerCase()&&t(i.activeElement).blur()}catch(t){}},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===t(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(e),this.originalPosition=this.position=this._generatePosition(e,!1),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._normalizeRightBottom(),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(e,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e,!0),this.positionAbs=this._convertPositionTo("absolute"),!i){var n=this._uiHash();if(this._trigger("drag",e,n)===!1)return this._mouseUp({}),!1;this.position=n.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,n=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(n=t.ui.ddmanager.drop(this,e)),this.dropped&&(n=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!n||"valid"===this.options.revert&&n||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,n)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",e)!==!1&&i._clear()}):this._trigger("stop",e)!==!1&&this._clear(),!1},_mouseUp:function(e){return this._unblockFrames(),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),this.handleElement.is(e.target)&&this.element.focus(),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(e){return!this.options.handle||!!t(e.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this.handleElement.addClass("ui-draggable-handle")},_removeHandleClassName:function(){this.handleElement.removeClass("ui-draggable-handle")},_createHelper:function(e){var i=this.options,n=t.isFunction(i.helper),r=n?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return r.parents("body").length||r.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),n&&r[0]===this.element[0]&&this._setPositionRelative(),r[0]===this.element[0]||/(fixed|absolute)/.test(r.css("position"))||r.css("position","absolute"),r},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var e=this.offsetParent.offset(),i=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==i&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,n,r=this.options,o=this.document[0];return this.relativeContainer=null,r.containment?"window"===r.containment?void(this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):"document"===r.containment?void(this.containment=[0,0,t(o).width()-this.helperProportions.width-this.margins.left,(t(o).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):r.containment.constructor===Array?void(this.containment=r.containment):("parent"===r.containment&&(r.containment=this.helper[0].parentNode),
i=t(r.containment),n=i[0],void(n&&(e=/(scroll|auto)/.test(i.css("overflow")),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(n.scrollWidth,n.offsetWidth):n.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(n.scrollHeight,n.offsetHeight):n.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i))):void(this.containment=null)},_convertPositionTo:function(t,e){e||(e=this.position);var i="absolute"===t?1:-1,n=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:n?0:this.offset.scroll.top)*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:n?0:this.offset.scroll.left)*i}},_generatePosition:function(t,e){var i,n,r,o,s=this.options,a=this._isRootNode(this.scrollParent[0]),l=t.pageX,u=t.pageY;return a&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(this.relativeContainer?(n=this.relativeContainer.offset(),i=[this.containment[0]+n.left,this.containment[1]+n.top,this.containment[2]+n.left,this.containment[3]+n.top]):i=this.containment,t.pageX-this.offset.click.left<i[0]&&(l=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(u=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(l=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(u=i[3]+this.offset.click.top)),s.grid&&(r=s.grid[1]?this.originalPageY+Math.round((u-this.originalPageY)/s.grid[1])*s.grid[1]:this.originalPageY,u=i?r-this.offset.click.top>=i[1]||r-this.offset.click.top>i[3]?r:r-this.offset.click.top>=i[1]?r-s.grid[1]:r+s.grid[1]:r,o=s.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/s.grid[0])*s.grid[0]:this.originalPageX,l=i?o-this.offset.click.left>=i[0]||o-this.offset.click.left>i[2]?o:o-this.offset.click.left>=i[0]?o-s.grid[0]:o+s.grid[0]:o),"y"===s.axis&&(l=this.originalPageX),"x"===s.axis&&(u=this.originalPageY)),{top:u-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:a?0:this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:a?0:this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_normalizeRightBottom:function(){"y"!==this.options.axis&&"auto"!==this.helper.css("right")&&(this.helper.width(this.helper.width()),this.helper.css("right","auto")),"x"!==this.options.axis&&"auto"!==this.helper.css("bottom")&&(this.helper.height(this.helper.height()),this.helper.css("bottom","auto"))},_trigger:function(e,i,n){return n=n||this._uiHash(),t.ui.plugin.call(this,e,[i,n,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),n.offset=this.positionAbs),t.Widget.prototype._trigger.call(this,e,i,n)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i,n){var r=t.extend({},i,{item:n.element});n.sortables=[],t(n.options.connectToSortable).each(function(){var i=t(this).sortable("instance");i&&!i.options.disabled&&(n.sortables.push(i),i.refreshPositions(),i._trigger("activate",e,r))})},stop:function(e,i,n){var r=t.extend({},i,{item:n.element});n.cancelHelperRemoval=!1,t.each(n.sortables,function(){var t=this;t.isOver?(t.isOver=0,n.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,r))})},drag:function(e,i,n){t.each(n.sortables,function(){var r=!1,o=this;o.positionAbs=n.positionAbs,o.helperProportions=n.helperProportions,o.offset.click=n.offset.click,o._intersectsWith(o.containerCache)&&(r=!0,t.each(n.sortables,function(){return this.positionAbs=n.positionAbs,this.helperProportions=n.helperProportions,this.offset.click=n.offset.click,this!==o&&this._intersectsWith(this.containerCache)&&t.contains(o.element[0],this.element[0])&&(r=!1),r})),r?(o.isOver||(o.isOver=1,n._parent=i.helper.parent(),o.currentItem=i.helper.appendTo(o.element).data("ui-sortable-item",!0),o.options._helper=o.options.helper,o.options.helper=function(){return i.helper[0]},e.target=o.currentItem[0],o._mouseCapture(e,!0),o._mouseStart(e,!0,!0),o.offset.click.top=n.offset.click.top,o.offset.click.left=n.offset.click.left,o.offset.parent.left-=n.offset.parent.left-o.offset.parent.left,o.offset.parent.top-=n.offset.parent.top-o.offset.parent.top,n._trigger("toSortable",e),n.dropped=o.element,t.each(n.sortables,function(){this.refreshPositions()}),n.currentItem=n.element,o.fromOutside=n),o.currentItem&&(o._mouseDrag(e),i.position=o.position)):o.isOver&&(o.isOver=0,o.cancelHelperRemoval=!0,o.options._revert=o.options.revert,o.options.revert=!1,o._trigger("out",e,o._uiHash(o)),o._mouseStop(e,!0),o.options.revert=o.options._revert,o.options.helper=o.options._helper,o.placeholder&&o.placeholder.remove(),i.helper.appendTo(n._parent),n._refreshOffsets(e),i.position=n._generatePosition(e,!0),n._trigger("fromSortable",e),n.dropped=!1,t.each(n.sortables,function(){this.refreshPositions()}))})}}),t.ui.plugin.add("draggable","cursor",{start:function(e,i,n){var r=t("body"),o=n.options;r.css("cursor")&&(o._cursor=r.css("cursor")),r.css("cursor",o.cursor)},stop:function(e,i,n){var r=n.options;r._cursor&&t("body").css("cursor",r._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i,n){var r=t(i.helper),o=n.options;r.css("opacity")&&(o._opacity=r.css("opacity")),r.css("opacity",o.opacity)},stop:function(e,i,n){var r=n.options;r._opacity&&t(i.helper).css("opacity",r._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(e,i,n){var r=n.options,o=!1,s=n.scrollParentNotHidden[0],a=n.document[0];s!==a&&"HTML"!==s.tagName?(r.axis&&"x"===r.axis||(n.overflowOffset.top+s.offsetHeight-e.pageY<r.scrollSensitivity?s.scrollTop=o=s.scrollTop+r.scrollSpeed:e.pageY-n.overflowOffset.top<r.scrollSensitivity&&(s.scrollTop=o=s.scrollTop-r.scrollSpeed)),r.axis&&"y"===r.axis||(n.overflowOffset.left+s.offsetWidth-e.pageX<r.scrollSensitivity?s.scrollLeft=o=s.scrollLeft+r.scrollSpeed:e.pageX-n.overflowOffset.left<r.scrollSensitivity&&(s.scrollLeft=o=s.scrollLeft-r.scrollSpeed))):(r.axis&&"x"===r.axis||(e.pageY-t(a).scrollTop()<r.scrollSensitivity?o=t(a).scrollTop(t(a).scrollTop()-r.scrollSpeed):t(window).height()-(e.pageY-t(a).scrollTop())<r.scrollSensitivity&&(o=t(a).scrollTop(t(a).scrollTop()+r.scrollSpeed))),r.axis&&"y"===r.axis||(e.pageX-t(a).scrollLeft()<r.scrollSensitivity?o=t(a).scrollLeft(t(a).scrollLeft()-r.scrollSpeed):t(window).width()-(e.pageX-t(a).scrollLeft())<r.scrollSensitivity&&(o=t(a).scrollLeft(t(a).scrollLeft()+r.scrollSpeed)))),o!==!1&&t.ui.ddmanager&&!r.dropBehaviour&&t.ui.ddmanager.prepareOffsets(n,e)}}),t.ui.plugin.add("draggable","snap",{start:function(e,i,n){var r=n.options;n.snapElements=[],t(r.snap.constructor!==String?r.snap.items||":data(ui-draggable)":r.snap).each(function(){var e=t(this),i=e.offset();this!==n.element[0]&&n.snapElements.push({item:this,width:e.outerWidth(),height:e.outerHeight(),top:i.top,left:i.left})})},drag:function(e,i,n){var r,o,s,a,l,u,c,h,d,p,f=n.options,m=f.snapTolerance,g=i.offset.left,v=g+n.helperProportions.width,y=i.offset.top,b=y+n.helperProportions.height;for(d=n.snapElements.length-1;d>=0;d--)l=n.snapElements[d].left-n.margins.left,u=l+n.snapElements[d].width,c=n.snapElements[d].top-n.margins.top,h=c+n.snapElements[d].height,v<l-m||g>u+m||b<c-m||y>h+m||!t.contains(n.snapElements[d].item.ownerDocument,n.snapElements[d].item)?(n.snapElements[d].snapping&&n.options.snap.release&&n.options.snap.release.call(n.element,e,t.extend(n._uiHash(),{snapItem:n.snapElements[d].item})),n.snapElements[d].snapping=!1):("inner"!==f.snapMode&&(r=Math.abs(c-b)<=m,o=Math.abs(h-y)<=m,s=Math.abs(l-v)<=m,a=Math.abs(u-g)<=m,r&&(i.position.top=n._convertPositionTo("relative",{top:c-n.helperProportions.height,left:0}).top),o&&(i.position.top=n._convertPositionTo("relative",{top:h,left:0}).top),s&&(i.position.left=n._convertPositionTo("relative",{top:0,left:l-n.helperProportions.width}).left),a&&(i.position.left=n._convertPositionTo("relative",{top:0,left:u}).left)),p=r||o||s||a,"outer"!==f.snapMode&&(r=Math.abs(c-y)<=m,o=Math.abs(h-b)<=m,s=Math.abs(l-g)<=m,a=Math.abs(u-v)<=m,r&&(i.position.top=n._convertPositionTo("relative",{top:c,left:0}).top),o&&(i.position.top=n._convertPositionTo("relative",{top:h-n.helperProportions.height,left:0}).top),s&&(i.position.left=n._convertPositionTo("relative",{top:0,left:l}).left),a&&(i.position.left=n._convertPositionTo("relative",{top:0,left:u-n.helperProportions.width}).left)),!n.snapElements[d].snapping&&(r||o||s||a||p)&&n.options.snap.snap&&n.options.snap.snap.call(n.element,e,t.extend(n._uiHash(),{snapItem:n.snapElements[d].item})),n.snapElements[d].snapping=r||o||s||a||p)}}),t.ui.plugin.add("draggable","stack",{start:function(e,i,n){var r,o=n.options,s=t.makeArray(t(o.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});s.length&&(r=parseInt(t(s[0]).css("zIndex"),10)||0,t(s).each(function(e){t(this).css("zIndex",r+e)}),this.css("zIndex",r+s.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i,n){var r=t(i.helper),o=n.options;r.css("zIndex")&&(o._zIndex=r.css("zIndex")),r.css("zIndex",o.zIndex)},stop:function(e,i,n){var r=n.options;r._zIndex&&t(i.helper).css("zIndex",r._zIndex)}}),t.ui.draggable}),function(t){"function"==typeof define&&define.amd?define(["jquery","./core","./mouse","./widget"],t):t(jQuery)}(function(t){return t.widget("ui.resizable",t.ui.mouse,{version:"1.11.4",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseInt(t,10)||0},_isNumber:function(t){return!isNaN(parseInt(t,10))},_hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var n=i&&"left"===i?"scrollLeft":"scrollTop",r=!1;return e[n]>0||(e[n]=1,r=e[n]>0,e[n]=0,r)},_create:function(){var e,i,n,r,o,s=this,a=this.options;if(this.element.addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!a.aspectRatio,aspectRatio:a.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:a.helper||a.ghost||a.animate?a.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(t("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=a.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=t(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),e=this.handles.split(","),this.handles={},i=0;i<e.length;i++)n=t.trim(e[i]),o="ui-resizable-"+n,r=t("<div class='ui-resizable-handle "+o+"'></div>"),r.css({zIndex:a.zIndex}),"se"===n&&r.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[n]=".ui-resizable-"+n,this.element.append(r);this._renderAxis=function(e){var i,n,r,o;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=t(this.handles[i]),this._on(this.handles[i],{mousedown:s._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(n=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?n.outerHeight():n.outerWidth(),r=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(r,o),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.mouseover(function(){s.resizing||(this.className&&(r=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),s.axis=r&&r[1]?r[1]:"se")}),a.autoHide&&(this._handles.hide(),t(this.element).addClass("ui-resizable-autohide").mouseenter(function(){a.disabled||(t(this).removeClass("ui-resizable-autohide"),s._handles.show())}).mouseleave(function(){a.disabled||s.resizing||(t(this).addClass("ui-resizable-autohide"),s._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(e){var i,n,r=!1;for(i in this.handles)n=t(this.handles[i])[0],(n===e.target||t.contains(n,e.target))&&(r=!0);return!this.options.disabled&&r},_mouseStart:function(e){var i,n,r,o=this.options,s=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),n=this._num(this.helper.css("top")),o.containment&&(i+=t(o.containment).scrollLeft()||0,n+=t(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:n},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:s.width(),height:s.height()},this.originalSize=this._helper?{width:s.outerWidth(),height:s.outerHeight()}:{width:s.width(),height:s.height()},this.sizeDiff={width:s.outerWidth()-s.width(),height:s.outerHeight()-s.height()},this.originalPosition={left:i,top:n},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,r=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===r?this.axis+"-resize":r),s.addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var i,n,r=this.originalMousePosition,o=this.axis,s=e.pageX-r.left||0,a=e.pageY-r.top||0,l=this._change[o];return this._updatePrevProperties(),!!l&&(i=l.apply(this,[e,s,a]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),n=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(n)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1)},_mouseStop:function(e){this.resizing=!1;var i,n,r,o,s,a,l,u=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,n=i.length&&/textarea/i.test(i[0].nodeName),r=n&&this._hasScroll(i[0],"left")?0:c.sizeDiff.height,o=n?0:c.sizeDiff.width,s={width:c.helper.width()-o,height:c.helper.height()-r},a=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null,l=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null,u.animate||this.element.css(t.extend(s,{top:l,left:a})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!u.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,n,r,o,s=this.options;o={minWidth:this._isNumber(s.minWidth)?s.minWidth:0,maxWidth:this._isNumber(s.maxWidth)?s.maxWidth:1/0,minHeight:this._isNumber(s.minHeight)?s.minHeight:0,maxHeight:this._isNumber(s.maxHeight)?s.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,n=o.minWidth/this.aspectRatio,i=o.maxHeight*this.aspectRatio,r=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),n>o.minHeight&&(o.minHeight=n),i<o.maxWidth&&(o.maxWidth=i),r<o.maxHeight&&(o.maxHeight=r)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,n=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===n&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===n&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,n=this._isNumber(t.width)&&e.maxWidth&&e.maxWidth<t.width,r=this._isNumber(t.height)&&e.maxHeight&&e.maxHeight<t.height,o=this._isNumber(t.width)&&e.minWidth&&e.minWidth>t.width,s=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,a=this.originalPosition.left+this.originalSize.width,l=this.position.top+this.size.height,u=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),s&&(t.height=e.minHeight),n&&(t.width=e.maxWidth),r&&(t.height=e.maxHeight),o&&u&&(t.left=a-e.minWidth),n&&u&&(t.left=a-e.maxWidth),s&&c&&(t.top=l-e.minHeight),r&&c&&(t.top=l-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],n=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],r=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];e<4;e++)i[e]=parseInt(n[e],10)||0,i[e]+=parseInt(r[e],10)||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;e<this._proportionallyResizeElements.length;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,n=this.originalPosition;return{left:n.left+e,width:i.width-e}},n:function(t,e,i){var n=this.originalSize,r=this.originalPosition;return{top:r.top+i,height:n.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,n){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,n]))},sw:function(e,i,n){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,n]))},ne:function(e,i,n){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,n]))},nw:function(e,i,n){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,n]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).resizable("instance"),n=i.options,r=i._proportionallyResizeElements,o=r.length&&/textarea/i.test(r[0].nodeName),s=o&&i._hasScroll(r[0],"left")?0:i.sizeDiff.height,a=o?0:i.sizeDiff.width,l={width:i.size.width-a,height:i.size.height-s},u=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,c=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(l,c&&u?{top:c,left:u}:{}),{duration:n.animateDuration,easing:n.animateEasing,step:function(){var n={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};r&&r.length&&t(r[0]).css({width:n.width,height:n.height}),i._updateCache(n),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,i,n,r,o,s,a,l=t(this).resizable("instance"),u=l.options,c=l.element,h=u.containment,d=h instanceof t?h.get(0):/parent/.test(h)?c.parent().get(0):h;d&&(l.containerElement=t(d),/document/.test(h)||h===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(d),i=[],t(["Top","Right","Left","Bottom"]).each(function(t,n){i[t]=l._num(e.css("padding"+n))}),l.containerOffset=e.offset(),l.containerPosition=e.position(),l.containerSize={height:e.innerHeight()-i[3],width:e.innerWidth()-i[1]},n=l.containerOffset,r=l.containerSize.height,o=l.containerSize.width,s=l._hasScroll(d,"left")?d.scrollWidth:o,a=l._hasScroll(d)?d.scrollHeight:r,l.parentData={element:d,left:n.left,top:n.top,width:s,height:a}))},resize:function(e){var i,n,r,o,s=t(this).resizable("instance"),a=s.options,l=s.containerOffset,u=s.position,c=s._aspectRatio||e.shiftKey,h={top:0,left:0},d=s.containerElement,p=!0;d[0]!==document&&/static/.test(d.css("position"))&&(h=l),u.left<(s._helper?l.left:0)&&(s.size.width=s.size.width+(s._helper?s.position.left-l.left:s.position.left-h.left),c&&(s.size.height=s.size.width/s.aspectRatio,p=!1),s.position.left=a.helper?l.left:0),u.top<(s._helper?l.top:0)&&(s.size.height=s.size.height+(s._helper?s.position.top-l.top:s.position.top),c&&(s.size.width=s.size.height*s.aspectRatio,p=!1),s.position.top=s._helper?l.top:0),r=s.containerElement.get(0)===s.element.parent().get(0),o=/relative|absolute/.test(s.containerElement.css("position")),r&&o?(s.offset.left=s.parentData.left+s.position.left,s.offset.top=s.parentData.top+s.position.top):(s.offset.left=s.element.offset().left,s.offset.top=s.element.offset().top),i=Math.abs(s.sizeDiff.width+(s._helper?s.offset.left-h.left:s.offset.left-l.left)),n=Math.abs(s.sizeDiff.height+(s._helper?s.offset.top-h.top:s.offset.top-l.top)),i+s.size.width>=s.parentData.width&&(s.size.width=s.parentData.width-i,c&&(s.size.height=s.size.width/s.aspectRatio,p=!1)),n+s.size.height>=s.parentData.height&&(s.size.height=s.parentData.height-n,c&&(s.size.width=s.size.height*s.aspectRatio,p=!1)),p||(s.position.left=s.prevPosition.left,s.position.top=s.prevPosition.top,s.size.width=s.prevSize.width,s.size.height=s.prevSize.height)},stop:function(){var e=t(this).resizable("instance"),i=e.options,n=e.containerOffset,r=e.containerPosition,o=e.containerElement,s=t(e.helper),a=s.offset(),l=s.outerWidth()-e.sizeDiff.width,u=s.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:a.left-r.left-n.left,width:l,height:u}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:a.left-r.left-n.left,width:l,height:u})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).resizable("instance"),i=e.options;t(i.alsoResize).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseInt(e.width(),10),height:parseInt(e.height(),10),left:parseInt(e.css("left"),10),top:parseInt(e.css("top"),10)})})},resize:function(e,i){var n=t(this).resizable("instance"),r=n.options,o=n.originalSize,s=n.originalPosition,a={height:n.size.height-o.height||0,width:n.size.width-o.width||0,top:n.position.top-s.top||0,left:n.position.left-s.left||0};t(r.alsoResize).each(function(){var e=t(this),n=t(this).data("ui-resizable-alsoresize"),r={},o=e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var i=(n[e]||0)+(a[e]||0);i&&i>=0&&(r[e]=i||null)}),e.css(r)})},stop:function(){t(this).removeData("resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),i=e.options,n=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:n.height,width:n.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e,i=t(this).resizable("instance"),n=i.options,r=i.size,o=i.originalSize,s=i.originalPosition,a=i.axis,l="number"==typeof n.grid?[n.grid,n.grid]:n.grid,u=l[0]||1,c=l[1]||1,h=Math.round((r.width-o.width)/u)*u,d=Math.round((r.height-o.height)/c)*c,p=o.width+h,f=o.height+d,m=n.maxWidth&&n.maxWidth<p,g=n.maxHeight&&n.maxHeight<f,v=n.minWidth&&n.minWidth>p,y=n.minHeight&&n.minHeight>f;n.grid=l,v&&(p+=u),y&&(f+=c),m&&(p-=u),g&&(f-=c),/^(se|s|e)$/.test(a)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(a)?(i.size.width=p,i.size.height=f,i.position.top=s.top-d):/^(sw)$/.test(a)?(i.size.width=p,i.size.height=f,i.position.left=s.left-h):((f-c<=0||p-u<=0)&&(e=i._getPaddingPlusBorderDimensions(this)),f-c>0?(i.size.height=f,i.position.top=s.top-d):(f=c-e.height,i.size.height=f,i.position.top=s.top+o.height-f),p-u>0?(i.size.width=p,i.position.left=s.left-h):(p=u-e.width,i.size.width=p,i.position.left=s.left+o.width-p))}}),t.ui.resizable}),function(t){"function"==typeof define&&define.amd?define(["jquery","./core","./widget","./button","./draggable","./mouse","./position","./resizable"],t):t(jQuery)}(function(t){return t.widget("ui.dialog",{version:"1.11.4",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"Close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(e){var i=t(this).css(e).offset().top;i<0&&t(this).css("top",e.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&t.fn.draggable&&this._makeDraggable(),this.options.resizable&&t.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var e=this.options.appendTo;return e&&(e.jquery||e.nodeType)?t(e):this.document.find(e||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),t=e.parent.children().eq(e.index),t.length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog},disable:t.noop,enable:t.noop,close:function(e){var i,n=this;if(this._isOpen&&this._trigger("beforeClose",e)!==!1){if(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),!this.opener.filter(":focusable").focus().length)try{i=this.document[0].activeElement,i&&"body"!==i.nodeName.toLowerCase()&&t(i).blur()}catch(t){}this._hide(this.uiDialog,this.options.hide,function(){n._trigger("close",e)})}},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(e,i){var n=!1,r=this.uiDialog.siblings(".ui-front:visible").map(function(){return+t(this).css("z-index")}).get(),o=Math.max.apply(null,r);return o>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",o+1),n=!0),n&&!i&&this._trigger("focus",e),n},open:function(){var e=this;return this._isOpen?void(this._moveToTop()&&this._focusTabbable()):(this._isOpen=!0,this.opener=t(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){e._focusTabbable(),e._trigger("focus")}),this._makeFocusTarget(),void this._trigger("open"))},_focusTabbable:function(){var t=this._focusedElement;t||(t=this.element.find("[autofocus]")),t.length||(t=this.element.find(":tabbable")),t.length||(t=this.uiDialogButtonPane.find(":tabbable")),t.length||(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||(t=this.uiDialog),t.eq(0).focus()},_keepFocus:function(e){function i(){var e=this.document[0].activeElement,i=this.uiDialog[0]===e||t.contains(this.uiDialog[0],e);
i||this._focusTabbable()}e.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=t("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(e){if(this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===t.ui.keyCode.ESCAPE)return e.preventDefault(),void this.close(e);if(e.keyCode===t.ui.keyCode.TAB&&!e.isDefaultPrevented()){var i=this.uiDialog.find(":tabbable"),n=i.filter(":first"),r=i.filter(":last");e.target!==r[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==n[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(this._delay(function(){r.focus()}),e.preventDefault()):(this._delay(function(){n.focus()}),e.preventDefault())}},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var e;this.uiDialogTitlebar=t("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(e){t(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=t("<button type='button'></button>").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),e=t("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(e),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(t){this.options.title||t.html("&#160;"),t.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=t("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=t("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var e=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),t.isEmptyObject(i)||t.isArray(i)&&!i.length?void this.uiDialog.removeClass("ui-dialog-buttons"):(t.each(i,function(i,n){var r,o;n=t.isFunction(n)?{click:n,text:i}:n,n=t.extend({type:"button"},n),r=n.click,n.click=function(){r.apply(e.element[0],arguments)},o={icons:n.icons,text:n.showText},delete n.icons,delete n.showText,t("<button></button>",n).button(o).appendTo(e.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),void this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){function e(t){return{position:t.position,offset:t.offset}}var i=this,n=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(n,r){t(this).addClass("ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",n,e(r))},drag:function(t,n){i._trigger("drag",t,e(n))},stop:function(r,o){var s=o.offset.left-i.document.scrollLeft(),a=o.offset.top-i.document.scrollTop();n.position={my:"left top",at:"left"+(s>=0?"+":"")+s+" top"+(a>=0?"+":"")+a,of:i.window},t(this).removeClass("ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",r,e(o))}})},_makeResizable:function(){function e(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}var i=this,n=this.options,r=n.resizable,o=this.uiDialog.css("position"),s="string"==typeof r?r:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:n.maxWidth,maxHeight:n.maxHeight,minWidth:n.minWidth,minHeight:this._minHeight(),handles:s,start:function(n,r){t(this).addClass("ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",n,e(r))},resize:function(t,n){i._trigger("resize",t,e(n))},stop:function(r,o){var s=i.uiDialog.offset(),a=s.left-i.document.scrollLeft(),l=s.top-i.document.scrollTop();n.height=i.uiDialog.height(),n.width=i.uiDialog.width(),n.position={my:"left top",at:"left"+(a>=0?"+":"")+a+" top"+(l>=0?"+":"")+l,of:i.window},t(this).removeClass("ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",r,e(o))}}).css("position",o)},_trackFocus:function(){this._on(this.widget(),{focusin:function(e){this._makeFocusTarget(),this._focusedElement=t(e.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var e=this._trackingInstances(),i=t.inArray(this,e);i!==-1&&e.splice(i,1)},_trackingInstances:function(){var t=this.document.data("ui-dialog-instances");return t||(t=[],this.document.data("ui-dialog-instances",t)),t},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(e){var i=this,n=!1,r={};t.each(e,function(t,e){i._setOption(t,e),t in i.sizeRelatedOptions&&(n=!0),t in i.resizableRelatedOptions&&(r[t]=e)}),n&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",r)},_setOption:function(t,e){var i,n,r=this.uiDialog;"dialogClass"===t&&r.removeClass(this.options.dialogClass).addClass(e),"disabled"!==t&&(this._super(t,e),"appendTo"===t&&this.uiDialog.appendTo(this._appendTo()),"buttons"===t&&this._createButtons(),"closeText"===t&&this.uiDialogTitlebarClose.button({label:""+e}),"draggable"===t&&(i=r.is(":data(ui-draggable)"),i&&!e&&r.draggable("destroy"),!i&&e&&this._makeDraggable()),"position"===t&&this._position(),"resizable"===t&&(n=r.is(":data(ui-resizable)"),n&&!e&&r.resizable("destroy"),n&&"string"==typeof e&&r.resizable("option","handles",e),n||e===!1||this._makeResizable()),"title"===t&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,n=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),n.minWidth>n.width&&(n.width=n.minWidth),t=this.uiDialog.css({height:"auto",width:n.width}).outerHeight(),e=Math.max(0,n.minHeight-t),i="number"==typeof n.maxHeight?Math.max(0,n.maxHeight-t):"none","auto"===n.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,n.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var e=t(this);return t("<div>").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(e){return!!t(e.target).closest(".ui-dialog").length||!!t(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=!0;this._delay(function(){e=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(t){e||this._allowInteraction(t)||(t.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=t("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var t=this.document.data("ui-dialog-overlays")-1;t?this.document.data("ui-dialog-overlays",t):this.document.unbind("focusin").removeData("ui-dialog-overlays"),this.overlay.remove(),this.overlay=null}}})}),function(t){"function"==typeof define&&define.amd?define(["jquery","./core","./widget","./mouse","./draggable"],t):t(jQuery)}(function(t){return t.widget("ui.droppable",{version:"1.11.4",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e,i=this.options,n=i.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(n)?n:function(t){return t.is(n)},this.proportions=function(){return arguments.length?void(e=arguments[0]):e?e:e={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}},this._addToManager(i.scope),i.addClasses&&this.element.addClass("ui-droppable")},_addToManager:function(e){t.ui.ddmanager.droppables[e]=t.ui.ddmanager.droppables[e]||[],t.ui.ddmanager.droppables[e].push(this)},_splice:function(t){for(var e=0;e<t.length;e++)t[e]===this&&t.splice(e,1)},_destroy:function(){var e=t.ui.ddmanager.droppables[this.options.scope];this._splice(e),this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(e,i){if("accept"===e)this.accept=t.isFunction(i)?i:function(t){return t.is(i)};else if("scope"===e){var n=t.ui.ddmanager.droppables[this.options.scope];this._splice(n),this._addToManager(i)}this._super(e,i)},_activate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var n=i||t.ui.ddmanager.current,r=!1;return!(!n||(n.currentItem||n.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var i=t(this).droppable("instance");if(i.options.greedy&&!i.options.disabled&&i.options.scope===n.options.scope&&i.accept.call(i.element[0],n.currentItem||n.element)&&t.ui.intersect(n,t.extend(i,{offset:i.element.offset()}),i.options.tolerance,e))return r=!0,!1}),!r&&(!!this.accept.call(this.element[0],n.currentItem||n.element)&&(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",e,this.ui(n)),this.element)))},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}}}),t.ui.intersect=function(){function t(t,e,i){return t>=e&&t<e+i}return function(e,i,n,r){if(!i.offset)return!1;var o=(e.positionAbs||e.position.absolute).left+e.margins.left,s=(e.positionAbs||e.position.absolute).top+e.margins.top,a=o+e.helperProportions.width,l=s+e.helperProportions.height,u=i.offset.left,c=i.offset.top,h=u+i.proportions().width,d=c+i.proportions().height;switch(n){case"fit":return u<=o&&a<=h&&c<=s&&l<=d;case"intersect":return u<o+e.helperProportions.width/2&&a-e.helperProportions.width/2<h&&c<s+e.helperProportions.height/2&&l-e.helperProportions.height/2<d;case"pointer":return t(r.pageY,c,i.proportions().height)&&t(r.pageX,u,i.proportions().width);case"touch":return(s>=c&&s<=d||l>=c&&l<=d||s<c&&l>d)&&(o>=u&&o<=h||a>=u&&a<=h||o<u&&a>h);default:return!1}}}(),t.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,i){var n,r,o=t.ui.ddmanager.droppables[e.options.scope]||[],s=i?i.type:null,a=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(n=0;n<o.length;n++)if(!(o[n].options.disabled||e&&!o[n].accept.call(o[n].element[0],e.currentItem||e.element))){for(r=0;r<a.length;r++)if(a[r]===o[n].element[0]){o[n].proportions().height=0;continue t}o[n].visible="none"!==o[n].element.css("display"),o[n].visible&&("mousedown"===s&&o[n]._activate.call(o[n],i),o[n].offset=o[n].element.offset(),o[n].proportions({width:o[n].element[0].offsetWidth,height:o[n].element[0].offsetHeight}))}},drop:function(e,i){var n=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&t.ui.intersect(e,this,this.options.tolerance,i)&&(n=this._drop.call(this,i)||n),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),n},dragStart:function(e,i){e.element.parentsUntil("body").bind("scroll.droppable",function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)})},drag:function(e,i){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var n,r,o,s=t.ui.intersect(e,this,this.options.tolerance,i),a=!s&&this.isover?"isout":s&&!this.isover?"isover":null;a&&(this.options.greedy&&(r=this.options.scope,o=this.element.parents(":data(ui-droppable)").filter(function(){return t(this).droppable("instance").options.scope===r}),o.length&&(n=t(o[0]).droppable("instance"),n.greedyChild="isover"===a)),n&&"isover"===a&&(n.isover=!1,n.isout=!0,n._out.call(n,i)),this[a]=!0,this["isout"===a?"isover":"isout"]=!1,this["isover"===a?"_over":"_out"].call(this,i),n&&"isout"===a&&(n.isout=!1,n.isover=!0,n._over.call(n,i)))}})},dragStop:function(e,i){e.element.parentsUntil("body").unbind("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}},t.ui.droppable}),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(t){var e="ui-effects-",i=t;return t.effects={effect:{}},function(t,e){function i(t,e,i){var n=h[e.type]||{};return null==t?i||!e.def?null:e.def:(t=n.floor?~~t:parseFloat(t),isNaN(t)?e.def:n.mod?(t+n.mod)%n.mod:0>t?0:n.max<t?n.max:t)}function n(e){var i=u(),n=i._rgba=[];return e=e.toLowerCase(),f(l,function(t,r){var o,s=r.re.exec(e),a=s&&r.parse(s),l=r.space||"rgba";if(a)return o=i[l](a),i[c[l].cache]=o[c[l].cache],n=i._rgba=o._rgba,!1}),n.length?("0,0,0,0"===n.join()&&t.extend(n,o.transparent),i):o[e]}function r(t,e,i){return i=(i+1)%1,6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}var o,s="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",a=/^([\-+])=\s*(\d+\.?\d*)/,l=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],u=t.Color=function(e,i,n,r){return new t.Color.fn.parse(e,i,n,r)},c={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},h={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=u.support={},p=t("<p>")[0],f=t.each;p.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),u.fn=t.extend(u.prototype,{parse:function(r,s,a,l){if(r===e)return this._rgba=[null,null,null,null],this;(r.jquery||r.nodeType)&&(r=t(r).css(s),s=e);var h=this,d=t.type(r),p=this._rgba=[];return s!==e&&(r=[r,s,a,l],d="array"),"string"===d?this.parse(n(r)||o._default):"array"===d?(f(c.rgba.props,function(t,e){p[e.idx]=i(r[e.idx],e)}),this):"object"===d?(r instanceof u?f(c,function(t,e){r[e.cache]&&(h[e.cache]=r[e.cache].slice())}):f(c,function(e,n){var o=n.cache;f(n.props,function(t,e){if(!h[o]&&n.to){if("alpha"===t||null==r[t])return;h[o]=n.to(h._rgba)}h[o][e.idx]=i(r[t],e,!0)}),h[o]&&t.inArray(null,h[o].slice(0,3))<0&&(h[o][3]=1,n.from&&(h._rgba=n.from(h[o])))}),this):void 0},is:function(t){var e=u(t),i=!0,n=this;return f(c,function(t,r){var o,s=e[r.cache];return s&&(o=n[r.cache]||r.to&&r.to(n._rgba)||[],f(r.props,function(t,e){if(null!=s[e.idx])return i=s[e.idx]===o[e.idx]})),i}),i},_space:function(){var t=[],e=this;return f(c,function(i,n){e[n.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var n=u(t),r=n._space(),o=c[r],s=0===this.alpha()?u("transparent"):this,a=s[o.cache]||o.to(s._rgba),l=a.slice();return n=n[o.cache],f(o.props,function(t,r){var o=r.idx,s=a[o],u=n[o],c=h[r.type]||{};null!==u&&(null===s?l[o]=u:(c.mod&&(u-s>c.mod/2?s+=c.mod:s-u>c.mod/2&&(s-=c.mod)),l[o]=i((u-s)*e+s,r)))}),this[r](l)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),n=i.pop(),r=u(e)._rgba;return u(t.map(i,function(t,e){return(1-n)*r[e]+n*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&e<3&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),n=i.pop();return e&&i.push(~~(255*n)),"#"+t.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),u.fn.parse.prototype=u.fn,c.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,n=t[0]/255,r=t[1]/255,o=t[2]/255,s=t[3],a=Math.max(n,r,o),l=Math.min(n,r,o),u=a-l,c=a+l,h=.5*c;return e=l===a?0:n===a?60*(r-o)/u+360:r===a?60*(o-n)/u+120:60*(n-r)/u+240,i=0===u?0:h<=.5?u/c:u/(2-c),[Math.round(e)%360,i,h,null==s?1:s]},c.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],n=t[2],o=t[3],s=n<=.5?n*(1+i):n+i-n*i,a=2*n-s;return[Math.round(255*r(a,s,e+1/3)),Math.round(255*r(a,s,e)),Math.round(255*r(a,s,e-1/3)),o]},f(c,function(n,r){var o=r.props,s=r.cache,l=r.to,c=r.from;u.fn[n]=function(n){if(l&&!this[s]&&(this[s]=l(this._rgba)),n===e)return this[s].slice();var r,a=t.type(n),h="array"===a||"object"===a?n:arguments,d=this[s].slice();return f(o,function(t,e){var n=h["object"===a?t:e.idx];null==n&&(n=d[e.idx]),d[e.idx]=i(n,e)}),c?(r=u(c(d)),r[s]=d,r):u(d)},f(o,function(e,i){u.fn[e]||(u.fn[e]=function(r){var o,s=t.type(r),l="alpha"===e?this._hsla?"hsla":"rgba":n,u=this[l](),c=u[i.idx];return"undefined"===s?c:("function"===s&&(r=r.call(this,c),s=t.type(r)),null==r&&i.empty?this:("string"===s&&(o=a.exec(r),o&&(r=c+parseFloat(o[2])*("+"===o[1]?1:-1))),u[i.idx]=r,this[l](u)))})})}),u.hook=function(e){var i=e.split(" ");f(i,function(e,i){t.cssHooks[i]={set:function(e,r){var o,s,a="";if("transparent"!==r&&("string"!==t.type(r)||(o=n(r)))){if(r=u(o||r),!d.rgba&&1!==r._rgba[3]){for(s="backgroundColor"===i?e.parentNode:e;(""===a||"transparent"===a)&&s&&s.style;)try{a=t.css(s,"backgroundColor"),s=s.parentNode}catch(t){}r=r.blend(a&&"transparent"!==a?a:"_default")}r=r.toRgbaString()}try{e.style[i]=r}catch(t){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=u(e.elem,i),e.end=u(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},u.hook(s),t.cssHooks.borderColor={expand:function(t){var e={};return f(["Top","Right","Bottom","Left"],function(i,n){e["border"+n+"Color"]=t}),e}},o=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(i),function(){function e(e){var i,n,r=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,o={};if(r&&r.length&&r[0]&&r[r[0]])for(n=r.length;n--;)i=r[n],"string"==typeof r[i]&&(o[t.camelCase(i)]=r[i]);else for(i in r)"string"==typeof r[i]&&(o[i]=r[i]);return o}function n(e,i){var n,r,s={};for(n in i)r=i[n],e[n]!==r&&(o[n]||!t.fx.step[n]&&isNaN(parseFloat(r))||(s[n]=r));return s}var r=["add","remove","toggle"],o={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,n){t.fx.step[n]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(i.style(t.elem,n,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(i,o,s,a){var l=t.speed(o,s,a);return this.queue(function(){var o,s=t(this),a=s.attr("class")||"",u=l.children?s.find("*").addBack():s;u=u.map(function(){var i=t(this);return{el:i,start:e(this)}}),o=function(){t.each(r,function(t,e){i[e]&&s[e+"Class"](i[e])})},o(),u=u.map(function(){return this.end=e(this.el[0]),this.diff=n(this.start,this.end),this}),s.attr("class",a),u=u.map(function(){var e=this,i=t.Deferred(),n=t.extend({},l,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,n),i.promise()}),t.when.apply(t,u.get()).done(function(){o(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),l.complete.call(s[0])})})},t.fn.extend({addClass:function(e){return function(i,n,r,o){return n?t.effects.animateClass.call(this,{add:i},n,r,o):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,n,r,o){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},n,r,o):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(e){return function(i,n,r,o,s){return"boolean"==typeof n||void 0===n?r?t.effects.animateClass.call(this,n?{add:i}:{remove:i},r,o,s):e.apply(this,arguments):t.effects.animateClass.call(this,{toggle:i},n,r,o)}}(t.fn.toggleClass),switchClass:function(e,i,n,r,o){return t.effects.animateClass.call(this,{add:i,remove:e},n,r,o)}})}(),function(){function i(e,i,n,r){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(r=i,n=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(r=n,n=i,i={}),t.isFunction(n)&&(r=n,n=null),i&&t.extend(e,i),n=n||i.duration,e.duration=t.fx.off?0:"number"==typeof n?n:n in t.fx.speeds?t.fx.speeds[n]:t.fx.speeds._default,e.complete=r||i.complete,e}function n(e){return!(e&&"number"!=typeof e&&!t.fx.speeds[e])||("string"==typeof e&&!t.effects.effect[e]||(!!t.isFunction(e)||"object"==typeof e&&!e.effect))}t.extend(t.effects,{version:"1.11.4",save:function(t,i){for(var n=0;n<i.length;n++)null!==i[n]&&t.data(e+i[n],t[0].style[i[n]])},restore:function(t,i){var n,r;for(r=0;r<i.length;r++)null!==i[r]&&(n=t.data(e+i[r]),void 0===n&&(n=""),t.css(i[r],n))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},getBaseline:function(t,e){var i,n;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":n=0;break;case"center":n=.5;break;case"right":n=1;break;default:n=t[1]/e.width}return{x:n,y:i}},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},n=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),r={width:e.width(),height:e.height()},o=document.activeElement;try{o.id}catch(t){o=document.body}return e.wrap(n),(e[0]===o||t.contains(e[0],o))&&t(o).focus(),n=e.parent(),"static"===e.css("position")?(n.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,n){i[n]=e.css(n),isNaN(parseInt(i[n],10))&&(i[n]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(r),n.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).focus()),e},setTransition:function(e,i,n,r){return r=r||{},t.each(i,function(t,i){var o=e.cssUnit(i);o[0]>0&&(r[i]=o[0]*n+o[1])}),r}}),t.fn.extend({effect:function(){function e(e){function i(){t.isFunction(o)&&o.call(r[0]),t.isFunction(e)&&e()}var r=t(this),o=n.complete,a=n.mode;(r.is(":hidden")?"hide"===a:"show"===a)?(r[a](),i()):s.call(r[0],n,i)}var n=i.apply(this,arguments),r=n.mode,o=n.queue,s=t.effects.effect[n.effect];return t.fx.off||!s?r?this[r](n.duration,n.complete):this.each(function(){n.complete&&n.complete.call(this)}):o===!1?this.each(e):this.queue(o||"fx",e)},show:function(t){return function(e){if(n(e))return t.apply(this,arguments);var r=i.apply(this,arguments);return r.mode="show",this.effect.call(this,r)}}(t.fn.show),hide:function(t){return function(e){if(n(e))return t.apply(this,arguments);var r=i.apply(this,arguments);return r.mode="hide",this.effect.call(this,r)}}(t.fn.hide),toggle:function(t){return function(e){if(n(e)||"boolean"==typeof e)return t.apply(this,arguments);var r=i.apply(this,arguments);return r.mode="toggle",this.effect.call(this,r)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),n=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(n=[parseFloat(i),e])}),n}})}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;t<((e=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return t<.5?i(2*t)/2:1-i(t*-2+2)/2}})}(),t.effects}),function(t){"function"==typeof define&&define.amd?define(["jquery","./effect"],t):t(jQuery)}(function(t){return t.effects.effect.blind=function(e,i){var n,r,o,s=t(this),a=/up|down|vertical/,l=/up|left|vertical|horizontal/,u=["position","top","bottom","left","right","height","width"],c=t.effects.setMode(s,e.mode||"hide"),h=e.direction||"up",d=a.test(h),p=d?"height":"width",f=d?"top":"left",m=l.test(h),g={},v="show"===c;s.parent().is(".ui-effects-wrapper")?t.effects.save(s.parent(),u):t.effects.save(s,u),s.show(),n=t.effects.createWrapper(s).css({overflow:"hidden"}),r=n[p](),o=parseFloat(n.css(f))||0,g[p]=v?r:0,m||(s.css(d?"bottom":"right",0).css(d?"top":"left","auto").css({position:"absolute"}),g[f]=v?o:r+o),v&&(n.css(p,0),m||n.css(f,o+r)),n.animate(g,{duration:e.duration,easing:e.easing,queue:!1,complete:function(){"hide"===c&&s.hide(),t.effects.restore(s,u),t.effects.removeWrapper(s),i()}})}}),function(t){"function"==typeof define&&define.amd?define(["jquery","./effect"],t):t(jQuery)}(function(t){return t.effects.effect.bounce=function(e,i){var n,r,o,s=t(this),a=["position","top","bottom","left","right","height","width"],l=t.effects.setMode(s,e.mode||"effect"),u="hide"===l,c="show"===l,h=e.direction||"up",d=e.distance,p=e.times||5,f=2*p+(c||u?1:0),m=e.duration/f,g=e.easing,v="up"===h||"down"===h?"top":"left",y="up"===h||"left"===h,b=s.queue(),_=b.length;for((c||u)&&a.push("opacity"),t.effects.save(s,a),s.show(),t.effects.createWrapper(s),d||(d=s["top"===v?"outerHeight":"outerWidth"]()/3),c&&(o={opacity:1},o[v]=0,s.css("opacity",0).css(v,y?2*-d:2*d).animate(o,m,g)),u&&(d/=Math.pow(2,p-1)),o={},o[v]=0,n=0;n<p;n++)r={},r[v]=(y?"-=":"+=")+d,s.animate(r,m,g).animate(o,m,g),d=u?2*d:d/2;u&&(r={opacity:0},r[v]=(y?"-=":"+=")+d,s.animate(r,m,g)),s.queue(function(){u&&s.hide(),t.effects.restore(s,a),t.effects.removeWrapper(s),i()}),_>1&&b.splice.apply(b,[1,0].concat(b.splice(_,f+1))),s.dequeue()}}),function(t){"function"==typeof define&&define.amd?define(["jquery","./effect"],t):t(jQuery)}(function(t){return t.effects.effect.clip=function(e,i){var n,r,o,s=t(this),a=["position","top","bottom","left","right","height","width"],l=t.effects.setMode(s,e.mode||"hide"),u="show"===l,c=e.direction||"vertical",h="vertical"===c,d=h?"height":"width",p=h?"top":"left",f={};t.effects.save(s,a),s.show(),n=t.effects.createWrapper(s).css({overflow:"hidden"}),r="IMG"===s[0].tagName?n:s,o=r[d](),u&&(r.css(d,0),r.css(p,o/2)),f[d]=u?o:0,f[p]=u?0:o/2,r.animate(f,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){u||s.hide(),t.effects.restore(s,a),t.effects.removeWrapper(s),i()}})}}),function(t){"function"==typeof define&&define.amd?define(["jquery","./effect"],t):t(jQuery)}(function(t){return t.effects.effect.drop=function(e,i){var n,r=t(this),o=["position","top","bottom","left","right","opacity","height","width"],s=t.effects.setMode(r,e.mode||"hide"),a="show"===s,l=e.direction||"left",u="up"===l||"down"===l?"top":"left",c="up"===l||"left"===l?"pos":"neg",h={opacity:a?1:0};t.effects.save(r,o),r.show(),t.effects.createWrapper(r),n=e.distance||r["top"===u?"outerHeight":"outerWidth"](!0)/2,a&&r.css("opacity",0).css(u,"pos"===c?-n:n),h[u]=(a?"pos"===c?"+=":"-=":"pos"===c?"-=":"+=")+n,r.animate(h,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===s&&r.hide(),t.effects.restore(r,o),t.effects.removeWrapper(r),i()}})}}),function(t){"function"==typeof define&&define.amd?define(["jquery","./effect"],t):t(jQuery)}(function(t){return t.effects.effect.explode=function(e,i){function n(){b.push(this),b.length===h*d&&r()}function r(){p.css({visibility:"visible"}),t(b).remove(),m||p.hide(),i()}var o,s,a,l,u,c,h=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=h,p=t(this),f=t.effects.setMode(p,e.mode||"hide"),m="show"===f,g=p.show().css("visibility","hidden").offset(),v=Math.ceil(p.outerWidth()/d),y=Math.ceil(p.outerHeight()/h),b=[];for(o=0;o<h;o++)for(l=g.top+o*y,c=o-(h-1)/2,s=0;s<d;s++)a=g.left+s*v,u=s-(d-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-s*v,top:-o*y}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:y,left:a+(m?u*v:0),top:l+(m?c*y:0),opacity:m?0:1}).animate({left:a+(m?0:u*v),top:l+(m?0:c*y),opacity:m?1:0},e.duration||500,e.easing,n)}}),function(t){"function"==typeof define&&define.amd?define(["jquery","./effect"],t):t(jQuery)}(function(t){return t.effects.effect.fade=function(e,i){var n=t(this),r=t.effects.setMode(n,e.mode||"toggle");n.animate({opacity:r},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}}),function(t){"function"==typeof define&&define.amd?define(["jquery","./effect"],t):t(jQuery)}(function(t){return t.effects.effect.fold=function(e,i){var n,r,o=t(this),s=["position","top","bottom","left","right","height","width"],a=t.effects.setMode(o,e.mode||"hide"),l="show"===a,u="hide"===a,c=e.size||15,h=/([0-9]+)%/.exec(c),d=!!e.horizFirst,p=l!==d,f=p?["width","height"]:["height","width"],m=e.duration/2,g={},v={};t.effects.save(o,s),o.show(),n=t.effects.createWrapper(o).css({overflow:"hidden"}),r=p?[n.width(),n.height()]:[n.height(),n.width()],h&&(c=parseInt(h[1],10)/100*r[u?0:1]),l&&n.css(d?{height:0,width:c}:{height:c,width:0}),g[f[0]]=l?r[0]:c,v[f[1]]=l?r[1]:0,n.animate(g,m,e.easing).animate(v,m,e.easing,function(){u&&o.hide(),t.effects.restore(o,s),t.effects.removeWrapper(o),i()})}}),function(t){"function"==typeof define&&define.amd?define(["jquery","./effect"],t):t(jQuery)}(function(t){return t.effects.effect.highlight=function(e,i){var n=t(this),r=["backgroundImage","backgroundColor","opacity"],o=t.effects.setMode(n,e.mode||"show"),s={backgroundColor:n.css("backgroundColor")};"hide"===o&&(s.opacity=0),t.effects.save(n,r),n.show().css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(s,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){
"hide"===o&&n.hide(),t.effects.restore(n,r),i()}})}}),function(t){"function"==typeof define&&define.amd?define(["jquery","./effect"],t):t(jQuery)}(function(t){return t.effects.effect.size=function(e,i){var n,r,o,s=t(this),a=["position","top","bottom","left","right","width","height","overflow","opacity"],l=["position","top","bottom","left","right","overflow","opacity"],u=["width","height","overflow"],c=["fontSize"],h=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],d=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=t.effects.setMode(s,e.mode||"effect"),f=e.restore||"effect"!==p,m=e.scale||"both",g=e.origin||["middle","center"],v=s.css("position"),y=f?a:l,b={height:0,width:0,outerHeight:0,outerWidth:0};"show"===p&&s.show(),n={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()},"toggle"===e.mode&&"show"===p?(s.from=e.to||b,s.to=e.from||n):(s.from=e.from||("show"===p?b:n),s.to=e.to||("hide"===p?b:n)),o={from:{y:s.from.height/n.height,x:s.from.width/n.width},to:{y:s.to.height/n.height,x:s.to.width/n.width}},"box"!==m&&"both"!==m||(o.from.y!==o.to.y&&(y=y.concat(h),s.from=t.effects.setTransition(s,h,o.from.y,s.from),s.to=t.effects.setTransition(s,h,o.to.y,s.to)),o.from.x!==o.to.x&&(y=y.concat(d),s.from=t.effects.setTransition(s,d,o.from.x,s.from),s.to=t.effects.setTransition(s,d,o.to.x,s.to))),"content"!==m&&"both"!==m||o.from.y!==o.to.y&&(y=y.concat(c).concat(u),s.from=t.effects.setTransition(s,c,o.from.y,s.from),s.to=t.effects.setTransition(s,c,o.to.y,s.to)),t.effects.save(s,y),s.show(),t.effects.createWrapper(s),s.css("overflow","hidden").css(s.from),g&&(r=t.effects.getBaseline(g,n),s.from.top=(n.outerHeight-s.outerHeight())*r.y,s.from.left=(n.outerWidth-s.outerWidth())*r.x,s.to.top=(n.outerHeight-s.to.outerHeight)*r.y,s.to.left=(n.outerWidth-s.to.outerWidth)*r.x),s.css(s.from),"content"!==m&&"both"!==m||(h=h.concat(["marginTop","marginBottom"]).concat(c),d=d.concat(["marginLeft","marginRight"]),u=a.concat(h).concat(d),s.find("*[width]").each(function(){var i=t(this),n={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()};f&&t.effects.save(i,u),i.from={height:n.height*o.from.y,width:n.width*o.from.x,outerHeight:n.outerHeight*o.from.y,outerWidth:n.outerWidth*o.from.x},i.to={height:n.height*o.to.y,width:n.width*o.to.x,outerHeight:n.height*o.to.y,outerWidth:n.width*o.to.x},o.from.y!==o.to.y&&(i.from=t.effects.setTransition(i,h,o.from.y,i.from),i.to=t.effects.setTransition(i,h,o.to.y,i.to)),o.from.x!==o.to.x&&(i.from=t.effects.setTransition(i,d,o.from.x,i.from),i.to=t.effects.setTransition(i,d,o.to.x,i.to)),i.css(i.from),i.animate(i.to,e.duration,e.easing,function(){f&&t.effects.restore(i,u)})})),s.animate(s.to,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){0===s.to.opacity&&s.css("opacity",s.from.opacity),"hide"===p&&s.hide(),t.effects.restore(s,y),f||("static"===v?s.css({position:"relative",top:s.to.top,left:s.to.left}):t.each(["top","left"],function(t,e){s.css(e,function(e,i){var n=parseInt(i,10),r=t?s.to.left:s.to.top;return"auto"===i?r+"px":n+r+"px"})})),t.effects.removeWrapper(s),i()}})}}),function(t){"function"==typeof define&&define.amd?define(["jquery","./effect","./effect-size"],t):t(jQuery)}(function(t){return t.effects.effect.scale=function(e,i){var n=t(this),r=t.extend(!0,{},e),o=t.effects.setMode(n,e.mode||"effect"),s=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"hide"===o?0:100),a=e.direction||"both",l=e.origin,u={height:n.height(),width:n.width(),outerHeight:n.outerHeight(),outerWidth:n.outerWidth()},c={y:"horizontal"!==a?s/100:1,x:"vertical"!==a?s/100:1};r.effect="size",r.queue=!1,r.complete=i,"effect"!==o&&(r.origin=l||["middle","center"],r.restore=!0),r.from=e.from||("show"===o?{height:0,width:0,outerHeight:0,outerWidth:0}:u),r.to={height:u.height*c.y,width:u.width*c.x,outerHeight:u.outerHeight*c.y,outerWidth:u.outerWidth*c.x},r.fade&&("show"===o&&(r.from.opacity=0,r.to.opacity=1),"hide"===o&&(r.from.opacity=1,r.to.opacity=0)),n.effect(r)}}),function(t){"function"==typeof define&&define.amd?define(["jquery","./effect","./effect-scale"],t):t(jQuery)}(function(t){return t.effects.effect.puff=function(e,i){var n=t(this),r=t.effects.setMode(n,e.mode||"hide"),o="hide"===r,s=parseInt(e.percent,10)||150,a=s/100,l={height:n.height(),width:n.width(),outerHeight:n.outerHeight(),outerWidth:n.outerWidth()};t.extend(e,{effect:"scale",queue:!1,fade:!0,mode:r,complete:i,percent:o?s:100,from:o?l:{height:l.height*a,width:l.width*a,outerHeight:l.outerHeight*a,outerWidth:l.outerWidth*a}}),n.effect(e)}}),function(t){"function"==typeof define&&define.amd?define(["jquery","./effect"],t):t(jQuery)}(function(t){return t.effects.effect.pulsate=function(e,i){var n,r=t(this),o=t.effects.setMode(r,e.mode||"show"),s="show"===o,a="hide"===o,l=s||"hide"===o,u=2*(e.times||5)+(l?1:0),c=e.duration/u,h=0,d=r.queue(),p=d.length;for(!s&&r.is(":visible")||(r.css("opacity",0).show(),h=1),n=1;n<u;n++)r.animate({opacity:h},c,e.easing),h=1-h;r.animate({opacity:h},c,e.easing),r.queue(function(){a&&r.hide(),i()}),p>1&&d.splice.apply(d,[1,0].concat(d.splice(p,u+1))),r.dequeue()}}),function(t){"function"==typeof define&&define.amd?define(["jquery","./effect"],t):t(jQuery)}(function(t){return t.effects.effect.shake=function(e,i){var n,r=t(this),o=["position","top","bottom","left","right","height","width"],s=t.effects.setMode(r,e.mode||"effect"),a=e.direction||"left",l=e.distance||20,u=e.times||3,c=2*u+1,h=Math.round(e.duration/c),d="up"===a||"down"===a?"top":"left",p="up"===a||"left"===a,f={},m={},g={},v=r.queue(),y=v.length;for(t.effects.save(r,o),r.show(),t.effects.createWrapper(r),f[d]=(p?"-=":"+=")+l,m[d]=(p?"+=":"-=")+2*l,g[d]=(p?"-=":"+=")+2*l,r.animate(f,h,e.easing),n=1;n<u;n++)r.animate(m,h,e.easing).animate(g,h,e.easing);r.animate(m,h,e.easing).animate(f,h/2,e.easing).queue(function(){"hide"===s&&r.hide(),t.effects.restore(r,o),t.effects.removeWrapper(r),i()}),y>1&&v.splice.apply(v,[1,0].concat(v.splice(y,c+1))),r.dequeue()}}),function(t){"function"==typeof define&&define.amd?define(["jquery","./effect"],t):t(jQuery)}(function(t){return t.effects.effect.slide=function(e,i){var n,r=t(this),o=["position","top","bottom","left","right","width","height"],s=t.effects.setMode(r,e.mode||"show"),a="show"===s,l=e.direction||"left",u="up"===l||"down"===l?"top":"left",c="up"===l||"left"===l,h={};t.effects.save(r,o),r.show(),n=e.distance||r["top"===u?"outerHeight":"outerWidth"](!0),t.effects.createWrapper(r).css({overflow:"hidden"}),a&&r.css(u,c?isNaN(n)?"-"+n:-n:n),h[u]=(a?c?"+=":"-=":c?"-=":"+=")+n,r.animate(h,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===s&&r.hide(),t.effects.restore(r,o),t.effects.removeWrapper(r),i()}})}}),function(t){"function"==typeof define&&define.amd?define(["jquery","./effect"],t):t(jQuery)}(function(t){return t.effects.effect.transfer=function(e,i){var n=t(this),r=t(e.to),o="fixed"===r.css("position"),s=t("body"),a=o?s.scrollTop():0,l=o?s.scrollLeft():0,u=r.offset(),c={top:u.top-a,left:u.left-l,height:r.innerHeight(),width:r.innerWidth()},h=n.offset(),d=t("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(e.className).css({top:h.top-a,left:h.left-l,height:n.innerHeight(),width:n.innerWidth(),position:o?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){d.remove(),i()})}}),function(t){"function"==typeof define&&define.amd?define(["jquery","./core","./widget"],t):t(jQuery)}(function(t){return t.widget("ui.progressbar",{version:"1.11.4",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min}),this.valueDiv=t("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(t){return void 0===t?this.options.value:(this.options.value=this._constrainedValue(t),void this._refreshValue())},_constrainedValue:function(t){return void 0===t&&(t=this.options.value),this.indeterminate=t===!1,"number"!=typeof t&&(t=0),!this.indeterminate&&Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),"disabled"===t&&this.element.toggleClass("ui-state-disabled",!!e).attr("aria-disabled",e),this._super(t,e)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).toggleClass("ui-corner-right",e===this.options.max).width(i.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}})}),function(t){"function"==typeof define&&define.amd?define(["jquery","./core","./mouse","./widget"],t):t(jQuery)}(function(t){return t.widget("ui.selectable",t.ui.mouse,{version:"1.11.4",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var e,i=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){e=t(i.options.filter,i.element[0]),e.addClass("ui-selectee"),e.each(function(){var e=t(this),i=e.offset();t.data(this,"selectable-item",{element:this,$element:e,left:i.left,top:i.top,right:i.left+e.outerWidth(),bottom:i.top+e.outerHeight(),startselected:!1,selected:e.hasClass("ui-selected"),selecting:e.hasClass("ui-selecting"),unselecting:e.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=e.addClass("ui-selectee"),this._mouseInit(),this.helper=t("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(e){var i=this,n=this.options;this.opos=[e.pageX,e.pageY],this.options.disabled||(this.selectees=t(n.filter,this.element[0]),this._trigger("start",e),t(n.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),n.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var n=t.data(this,"selectable-item");n.startselected=!0,e.metaKey||e.ctrlKey||(n.$element.removeClass("ui-selected"),n.selected=!1,n.$element.addClass("ui-unselecting"),n.unselecting=!0,i._trigger("unselecting",e,{unselecting:n.element}))}),t(e.target).parents().addBack().each(function(){var n,r=t.data(this,"selectable-item");if(r)return n=!e.metaKey&&!e.ctrlKey||!r.$element.hasClass("ui-selected"),r.$element.removeClass(n?"ui-unselecting":"ui-selected").addClass(n?"ui-selecting":"ui-unselecting"),r.unselecting=!n,r.selecting=n,r.selected=n,n?i._trigger("selecting",e,{selecting:r.element}):i._trigger("unselecting",e,{unselecting:r.element}),!1}))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,n=this,r=this.options,o=this.opos[0],s=this.opos[1],a=e.pageX,l=e.pageY;return o>a&&(i=a,a=o,o=i),s>l&&(i=l,l=s,s=i),this.helper.css({left:o,top:s,width:a-o,height:l-s}),this.selectees.each(function(){var i=t.data(this,"selectable-item"),u=!1;i&&i.element!==n.element[0]&&("touch"===r.tolerance?u=!(i.left>a||i.right<o||i.top>l||i.bottom<s):"fit"===r.tolerance&&(u=i.left>o&&i.right<a&&i.top>s&&i.bottom<l),u?(i.selected&&(i.$element.removeClass("ui-selected"),i.selected=!1),i.unselecting&&(i.$element.removeClass("ui-unselecting"),i.unselecting=!1),i.selecting||(i.$element.addClass("ui-selecting"),i.selecting=!0,n._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metaKey||e.ctrlKey)&&i.startselected?(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.$element.addClass("ui-selected"),i.selected=!0):(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.startselected&&(i.$element.addClass("ui-unselecting"),i.unselecting=!0),n._trigger("unselecting",e,{unselecting:i.element}))),i.selected&&(e.metaKey||e.ctrlKey||i.startselected||(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,n._trigger("unselecting",e,{unselecting:i.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,t(".ui-unselecting",this.element[0]).each(function(){var n=t.data(this,"selectable-item");n.$element.removeClass("ui-unselecting"),n.unselecting=!1,n.startselected=!1,i._trigger("unselected",e,{unselected:n.element})}),t(".ui-selecting",this.element[0]).each(function(){var n=t.data(this,"selectable-item");n.$element.removeClass("ui-selecting").addClass("ui-selected"),n.selecting=!1,n.selected=!0,n.startselected=!0,i._trigger("selected",e,{selected:n.element})}),this._trigger("stop",e),this.helper.remove(),!1}})}),function(t){"function"==typeof define&&define.amd?define(["jquery","./core","./widget","./position","./menu"],t):t(jQuery)}(function(t){return t.widget("ui.selectmenu",{version:"1.11.4",defaultElement:"<select>",options:{appendTo:null,disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:null,change:null,close:null,focus:null,open:null,select:null},_create:function(){var t=this.element.uniqueId().attr("id");this.ids={element:t,button:t+"-button",menu:t+"-menu"},this._drawButton(),this._drawMenu(),this.options.disabled&&this.disable()},_drawButton:function(){var e=this;this.label=t("label[for='"+this.ids.element+"']").attr("for",this.ids.button),this._on(this.label,{click:function(t){this.button.focus(),t.preventDefault()}}),this.element.hide(),this.button=t("<span>",{"class":"ui-selectmenu-button ui-widget ui-state-default ui-corner-all",tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true"}).insertAfter(this.element),t("<span>",{"class":"ui-icon "+this.options.icons.button}).prependTo(this.button),this.buttonText=t("<span>",{"class":"ui-selectmenu-text"}).appendTo(this.button),this._setText(this.buttonText,this.element.find("option:selected").text()),this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){e.menuItems||e._refreshMenu()}),this._hoverable(this.button),this._focusable(this.button)},_drawMenu:function(){var e=this;this.menu=t("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=t("<div>",{"class":"ui-selectmenu-menu ui-front"}).append(this.menu).appendTo(this._appendTo()),this.menuInstance=this.menu.menu({role:"listbox",select:function(t,i){t.preventDefault(),e._setSelection(),e._select(i.item.data("ui-selectmenu-item"),t)},focus:function(t,i){var n=i.item.data("ui-selectmenu-item");null!=e.focusIndex&&n.index!==e.focusIndex&&(e._trigger("focus",t,{item:n}),e.isOpen||e._select(n,t)),e.focusIndex=n.index,e.button.attr("aria-activedescendant",e.menuItems.eq(n.index).attr("id"))}}).menu("instance"),this.menu.addClass("ui-corner-bottom").removeClass("ui-corner-all"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this._setText(this.buttonText,this._getSelectedItem().text()),this.options.width||this._resizeButton()},_refreshMenu:function(){this.menu.empty();var t,e=this.element.find("option");e.length&&(this._parseOptions(e),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup"),t=this._getSelectedItem(),this.menuInstance.focus(null,t),this._setAria(t.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(t){this.options.disabled||(this.menuItems?(this.menu.find(".ui-state-focus").removeClass("ui-state-focus"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",t))},_position:function(){this.menuWrap.position(t.extend({of:this.button},this.options.position))},close:function(t){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",t))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderMenu:function(e,i){var n=this,r="";t.each(i,function(i,o){o.optgroup!==r&&(t("<li>",{"class":"ui-selectmenu-optgroup ui-menu-divider"+(o.element.parent("optgroup").prop("disabled")?" ui-state-disabled":""),text:o.optgroup}).appendTo(e),r=o.optgroup),n._renderItemData(e,o)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-selectmenu-item",e)},_renderItem:function(e,i){var n=t("<li>");return i.disabled&&n.addClass("ui-state-disabled"),this._setText(n,i.label),n.appendTo(e)},_setText:function(t,e){e?t.text(e):t.html("&#160;")},_move:function(t,e){var i,n,r=".ui-menu-item";this.isOpen?i=this.menuItems.eq(this.focusIndex):(i=this.menuItems.eq(this.element[0].selectedIndex),r+=":not(.ui-state-disabled)"),n="first"===t||"last"===t?i["first"===t?"prevAll":"nextAll"](r).eq(-1):i[t+"All"](r).eq(0),n.length&&this.menuInstance.focus(e,n)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex)},_toggle:function(t){this[this.isOpen?"close":"open"](t)},_setSelection:function(){var t;this.range&&(window.getSelection?(t=window.getSelection(),t.removeAllRanges(),t.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(e){this.isOpen&&(t(e.target).closest(".ui-selectmenu-menu, #"+this.ids.button).length||this.close(e))}},_buttonEvents:{mousedown:function(){var t;window.getSelection?(t=window.getSelection(),t.rangeCount&&(this.range=t.getRangeAt(0))):this.range=document.selection.createRange()},click:function(t){this._setSelection(),this._toggle(t)},keydown:function(e){var i=!0;switch(e.keyCode){case t.ui.keyCode.TAB:case t.ui.keyCode.ESCAPE:this.close(e),i=!1;break;case t.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(e);break;case t.ui.keyCode.UP:e.altKey?this._toggle(e):this._move("prev",e);break;case t.ui.keyCode.DOWN:e.altKey?this._toggle(e):this._move("next",e);break;case t.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(e):this._toggle(e);break;case t.ui.keyCode.LEFT:this._move("prev",e);break;case t.ui.keyCode.RIGHT:this._move("next",e);break;case t.ui.keyCode.HOME:case t.ui.keyCode.PAGE_UP:this._move("first",e);break;case t.ui.keyCode.END:case t.ui.keyCode.PAGE_DOWN:this._move("last",e);break;default:this.menu.trigger(e),i=!1}i&&e.preventDefault()}},_selectFocusedItem:function(t){var e=this.menuItems.eq(this.focusIndex);e.hasClass("ui-state-disabled")||this._select(e.data("ui-selectmenu-item"),t)},_select:function(t,e){var i=this.element[0].selectedIndex;this.element[0].selectedIndex=t.index,this._setText(this.buttonText,t.label),this._setAria(t),this._trigger("select",e,{item:t}),t.index!==i&&this._trigger("change",e,{item:t}),this.close(e)},_setAria:function(t){var e=this.menuItems.eq(t.index).attr("id");this.button.attr({"aria-labelledby":e,"aria-activedescendant":e}),this.menu.attr("aria-activedescendant",e)},_setOption:function(t,e){"icons"===t&&this.button.find("span.ui-icon").removeClass(this.options.icons.button).addClass(e.button),this._super(t,e),"appendTo"===t&&this.menuWrap.appendTo(this._appendTo()),"disabled"===t&&(this.menuInstance.option("disabled",e),this.button.toggleClass("ui-state-disabled",e).attr("aria-disabled",e),this.element.prop("disabled",e),e?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)),"width"===t&&this._resizeButton()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front")),e.length||(e=this.document[0].body),e},_toggleAttr:function(){this.button.toggleClass("ui-corner-top",this.isOpen).toggleClass("ui-corner-all",!this.isOpen).attr("aria-expanded",this.isOpen),this.menuWrap.toggleClass("ui-selectmenu-open",this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var t=this.options.width;t||(t=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(t)},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){return{disabled:this.element.prop("disabled")}},_parseOptions:function(e){var i=[];e.each(function(e,n){var r=t(n),o=r.parent("optgroup");i.push({element:r,index:e,value:r.val(),label:r.text(),optgroup:o.attr("label")||"",disabled:o.prop("disabled")||r.prop("disabled")})}),this.items=i},_destroy:function(){this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.label.attr("for",this.ids.element)}})}),function(t){"function"==typeof define&&define.amd?define(["jquery","./core","./mouse","./widget"],t):t(jQuery)}(function(t){return t.widget("ui.slider",t.ui.mouse,{version:"1.11.4",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,n=this.options,r=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),o="<span class='ui-slider-handle ui-state-default ui-corner-all' tabindex='0'></span>",s=[];for(i=n.values&&n.values.length||1,r.length>i&&(r.slice(i).remove(),r=r.slice(0,i)),e=r.length;e<i;e++)s.push(o);this.handles=r.add(t(s.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e)})},_createRange:function(){var e=this.options,i="";e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=t("<div></div>").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===e.range||"max"===e.range?" ui-slider-range-"+e.range:""))):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(e){var i,n,r,o,s,a,l,u,c=this,h=this.options;return!h.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},n=this._normValueFromMouse(i),r=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(n-c.values(e));(r>i||r===i&&(e===c._lastChangedValue||c.values(e)===h.min))&&(r=i,o=t(this),s=e)}),a=this._start(e,s),a!==!1&&(this._mouseSliding=!0,this._handleIndex=s,o.addClass("ui-state-active").focus(),l=o.offset(),u=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=u?{left:0,top:0}:{left:e.pageX-l.left-o.width()/2,top:e.pageY-l.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,s,n),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,n,r,o;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),n=i/e,n>1&&(n=1),n<0&&(n=0),"vertical"===this.orientation&&(n=1-n),r=this._valueMax()-this._valueMin(),o=this._valueMin()+n*r,this._trimAlignValue(o)},_start:function(t,e){var i={handle:this.handles[e],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("start",t,i)},_slide:function(t,e,i){var n,r,o;this.options.values&&this.options.values.length?(n=this.values(e?0:1),2===this.options.values.length&&this.options.range===!0&&(0===e&&i>n||1===e&&i<n)&&(i=n),i!==this.values(e)&&(r=this.values(),r[e]=i,o=this._trigger("slide",t,{handle:this.handles[e],value:i,values:r}),n=this.values(e?0:1),o!==!1&&this.values(e,i))):i!==this.value()&&(o=this._trigger("slide",t,{handle:this.handles[e],value:i}),o!==!1&&this.value(i))},_stop:function(t,e){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("stop",t,i)},_change:function(t,e){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._lastChangedValue=e,this._trigger("change",t,i)}},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),void this._change(null,0)):this._value()},values:function(e,i){var n,r,o;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),void this._change(null,e);if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(e):this.value();for(n=this.options.values,r=arguments[0],o=0;o<n.length;o+=1)n[o]=this._trimAlignValue(r[o]),this._change(null,o);this._refreshValue()},_setOption:function(e,i){var n,r=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(r=this.options.values.length),"disabled"===e&&this.element.toggleClass("ui-state-disabled",!!i),this._super(e,i),e){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue(),this.handles.css("horizontal"===i?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),n=0;n<r;n+=1)this._change(null,n);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,n;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),n=0;n<i.length;n+=1)i[n]=this._trimAlignValue(i[n]);return i}return[]},_trimAlignValue:function(t){if(t<=this._valueMin())return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,n=t-i;return 2*Math.abs(i)>=e&&(n+=i>0?e:-e),parseFloat(n.toFixed(5))},_calculateNewMax:function(){var t=this.options.max,e=this._valueMin(),i=this.options.step,n=Math.floor(+(t-e).toFixed(this._precision())/i)*i;t=n+e,this.max=parseFloat(t.toFixed(this._precision()))},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=t.toString(),i=e.indexOf(".");return i===-1?0:e.length-i-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshValue:function(){var e,i,n,r,o,s=this.options.range,a=this.options,l=this,u=!this._animateOff&&a.animate,c={};this.options.values&&this.options.values.length?this.handles.each(function(n){i=(l.values(n)-l._valueMin())/(l._valueMax()-l._valueMin())*100,c["horizontal"===l.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[u?"animate":"css"](c,a.animate),l.options.range===!0&&("horizontal"===l.orientation?(0===n&&l.range.stop(1,1)[u?"animate":"css"]({left:i+"%"},a.animate),1===n&&l.range[u?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:a.animate})):(0===n&&l.range.stop(1,1)[u?"animate":"css"]({bottom:i+"%"},a.animate),1===n&&l.range[u?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:a.animate}))),e=i}):(n=this.value(),r=this._valueMin(),o=this._valueMax(),i=o!==r?(n-r)/(o-r)*100:0,c["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[u?"animate":"css"](c,a.animate),"min"===s&&"horizontal"===this.orientation&&this.range.stop(1,1)[u?"animate":"css"]({width:i+"%"},a.animate),"max"===s&&"horizontal"===this.orientation&&this.range[u?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:a.animate}),"min"===s&&"vertical"===this.orientation&&this.range.stop(1,1)[u?"animate":"css"]({height:i+"%"},a.animate),"max"===s&&"vertical"===this.orientation&&this.range[u?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:a.animate}))},_handleEvents:{keydown:function(e){var i,n,r,o,s=t(e.target).data("ui-slider-handle-index");switch(e.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,t(e.target).addClass("ui-state-active"),i=this._start(e,s),i===!1))return}switch(o=this.options.step,n=r=this.options.values&&this.options.values.length?this.values(s):this.value(),e.keyCode){case t.ui.keyCode.HOME:r=this._valueMin();break;case t.ui.keyCode.END:r=this._valueMax();break;case t.ui.keyCode.PAGE_UP:r=this._trimAlignValue(n+(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.PAGE_DOWN:r=this._trimAlignValue(n-(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(n===this._valueMax())return;r=this._trimAlignValue(n+o);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(n===this._valueMin())return;r=this._trimAlignValue(n-o)}this._slide(e,s,r)},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),t(e.target).removeClass("ui-state-active"))}}})}),function(t){"function"==typeof define&&define.amd?define(["jquery","./core","./mouse","./widget"],t):t(jQuery)}(function(t){return t.widget("ui.sortable",t.ui.mouse,{
version:"1.11.4",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,i){return t>=e&&t<e+i},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){this.element.find(".ui-sortable-handle").removeClass("ui-sortable-handle"),t.each(this.items,function(){(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item).addClass("ui-sortable-handle")})},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").find(".ui-sortable-handle").removeClass("ui-sortable-handle"),this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(e,i){var n=null,r=!1,o=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(e),t(e.target).parents().each(function(){if(t.data(this,o.widgetName+"-item")===o)return n=t(this),!1}),t.data(e.target,o.widgetName+"-item")===o&&(n=t(e.target)),!!n&&(!(this.options.handle&&!i&&(t(this.options.handle,n).find("*").addBack().each(function(){this===e.target&&(r=!0)}),!r))&&(this.currentItem=n,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(e,i,n){var r,o,s=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,s.cursorAt&&this._adjustOffsetFromHelper(s.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),s.containment&&this._setContainment(),s.cursor&&"auto"!==s.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",s.cursor),this.storedStylesheet=t("<style>*{ cursor: "+s.cursor+" !important; }</style>").appendTo(o)),s.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",s.opacity)),s.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",s.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!n)for(r=this.containers.length-1;r>=0;r--)this.containers[r]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!s.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,n,r,o,s=this.options,a=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<s.scrollSensitivity?this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop+s.scrollSpeed:e.pageY-this.overflowOffset.top<s.scrollSensitivity&&(this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop-s.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<s.scrollSensitivity?this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft+s.scrollSpeed:e.pageX-this.overflowOffset.left<s.scrollSensitivity&&(this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft-s.scrollSpeed)):(e.pageY-this.document.scrollTop()<s.scrollSensitivity?a=this.document.scrollTop(this.document.scrollTop()-s.scrollSpeed):this.window.height()-(e.pageY-this.document.scrollTop())<s.scrollSensitivity&&(a=this.document.scrollTop(this.document.scrollTop()+s.scrollSpeed)),e.pageX-this.document.scrollLeft()<s.scrollSensitivity?a=this.document.scrollLeft(this.document.scrollLeft()-s.scrollSpeed):this.window.width()-(e.pageX-this.document.scrollLeft())<s.scrollSensitivity&&(a=this.document.scrollLeft(this.document.scrollLeft()+s.scrollSpeed))),a!==!1&&t.ui.ddmanager&&!s.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(n=this.items[i],r=n.item[0],o=this._intersectsWithPointer(n),o&&n.instance===this.currentContainer&&!(r===this.currentItem[0]||this.placeholder[1===o?"next":"prev"]()[0]===r||t.contains(this.placeholder[0],r)||"semi-dynamic"===this.options.type&&t.contains(this.element[0],r))){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(n))break;this._rearrange(e,n),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var n=this,r=this.placeholder.offset(),o=this.options.axis,s={};o&&"x"!==o||(s.left=r.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(s.top=r.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(s,parseInt(this.options.revert,10)||500,function(){n._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),n=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&n.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!n.length&&e.key&&n.push(e.key+"="),n.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),n=[];return e=e||{},i.each(function(){n.push(t(e.item||this).attr(e.attribute||"id")||"")}),n},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,n=this.positionAbs.top,r=n+this.helperProportions.height,o=t.left,s=o+t.width,a=t.top,l=a+t.height,u=this.offset.click.top,c=this.offset.click.left,h="x"===this.options.axis||n+u>a&&n+u<l,d="y"===this.options.axis||e+c>o&&e+c<s,p=h&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:o<e+this.helperProportions.width/2&&i-this.helperProportions.width/2<s&&a<n+this.helperProportions.height/2&&r-this.helperProportions.height/2<l},_intersectsWithPointer:function(t){var e="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),i="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width),n=e&&i,r=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return!!n&&(this.floating?o&&"right"===o||"down"===r?2:1:r&&("down"===r?2:1))},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),n=this._getDragVerticalDirection(),r=this._getDragHorizontalDirection();return this.floating&&r?"right"===r&&i||"left"===r&&!i:n&&("down"===n&&e||"up"===n&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){function i(){a.push(this)}var n,r,o,s,a=[],l=[],u=this._connectWith();if(u&&e)for(n=u.length-1;n>=0;n--)for(o=t(u[n],this.document[0]),r=o.length-1;r>=0;r--)s=t.data(o[r],this.widgetFullName),s&&s!==this&&!s.options.disabled&&l.push([t.isFunction(s.options.items)?s.options.items.call(s.element):t(s.options.items,s.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),s]);for(l.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),n=l.length-1;n>=0;n--)l[n][0].each(i);return t(a)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;i<e.length;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,n,r,o,s,a,l,u,c=this.items,h=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(r=t(d[i],this.document[0]),n=r.length-1;n>=0;n--)o=t.data(r[n],this.widgetFullName),o&&o!==this&&!o.options.disabled&&(h.push([t.isFunction(o.options.items)?o.options.items.call(o.element[0],e,{item:this.currentItem}):t(o.options.items,o.element),o]),this.containers.push(o));for(i=h.length-1;i>=0;i--)for(s=h[i][1],a=h[i][0],n=0,u=a.length;n<u;n++)l=t(a[n]),l.data(this.widgetName+"-item",s),c.push({item:l,instance:s,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,n,r,o;for(i=this.items.length-1;i>=0;i--)n=this.items[i],n.instance!==this.currentContainer&&this.currentContainer&&n.item[0]!==this.currentItem[0]||(r=this.options.toleranceElement?t(this.options.toleranceElement,n.item):n.item,e||(n.width=r.outerWidth(),n.height=r.outerHeight()),o=r.offset(),n.left=o.left,n.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)o=this.containers[i].element.offset(),this.containers[i].containerCache.left=o.left,this.containers[i].containerCache.top=o.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var i,n=e.options;n.placeholder&&n.placeholder.constructor!==String||(i=n.placeholder,n.placeholder={element:function(){var n=e.currentItem[0].nodeName.toLowerCase(),r=t("<"+n+">",e.document[0]).addClass(i||e.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tbody"===n?e._createTrPlaceholder(e.currentItem.find("tr").eq(0),t("<tr>",e.document[0]).appendTo(r)):"tr"===n?e._createTrPlaceholder(e.currentItem,r):"img"===n&&r.attr("src",e.currentItem.attr("src")),i||r.css("visibility","hidden"),r},update:function(t,r){i&&!n.forcePlaceholderSize||(r.height()||r.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),r.width()||r.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(n.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),n.placeholder.update(e,e.placeholder)},_createTrPlaceholder:function(e,i){var n=this;e.children().each(function(){t("<td>&#160;</td>",n.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(i)})},_contactContainers:function(e){var i,n,r,o,s,a,l,u,c,h,d=null,p=null;for(i=this.containers.length-1;i>=0;i--)if(!t.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(d&&t.contains(this.containers[i].element[0],d.element[0]))continue;d=this.containers[i],p=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",e,this._uiHash(this)),this.containers[i].containerCache.over=0);if(d)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(r=1e4,o=null,c=d.floating||this._isFloating(this.currentItem),s=c?"left":"top",a=c?"width":"height",h=c?"clientX":"clientY",n=this.items.length-1;n>=0;n--)t.contains(this.containers[p].element[0],this.items[n].item[0])&&this.items[n].item[0]!==this.currentItem[0]&&(l=this.items[n].item.offset()[s],u=!1,e[h]-l>this.items[n][a]/2&&(u=!0),Math.abs(e[h]-l)<r&&(r=Math.abs(e[h]-l),o=this.items[n],this.direction=u?"up":"down"));if(!o&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[p])return void(this.currentContainer.containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash()),this.currentContainer.containerCache.over=1));o?this._rearrange(e,o,null,!0):this._rearrange(e,null,this.containers[p].element,!0),this._trigger("change",e,this._uiHash()),this.containers[p]._trigger("change",e,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1}},_createHelper:function(e){var i=this.options,n=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return n.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(n[0]),n[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),n[0].style.width&&!i.forceHelperSize||n.width(this.currentItem.width()),n[0].style.height&&!i.forceHelperSize||n.height(this.currentItem.height()),n},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,n,r=this.options;"parent"===r.containment&&(r.containment=this.helper[0].parentNode),"document"!==r.containment&&"window"!==r.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===r.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===r.containment?this.document.width():this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(r.containment)||(e=t(r.containment)[0],i=t(r.containment).offset(),n="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(n?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(n?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var n="absolute"===e?1:-1,r="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(r[0].tagName);return{top:i.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:r.scrollTop())*n,left:i.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:r.scrollLeft())*n}},_generatePosition:function(e){var i,n,r=this.options,o=e.pageX,s=e.pageY,a="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=/(html|body)/i.test(a[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(s=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(s=this.containment[3]+this.offset.click.top)),r.grid&&(i=this.originalPageY+Math.round((s-this.originalPageY)/r.grid[1])*r.grid[1],s=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-r.grid[1]:i+r.grid[1]:i,n=this.originalPageX+Math.round((o-this.originalPageX)/r.grid[0])*r.grid[0],o=this.containment?n-this.offset.click.left>=this.containment[0]&&n-this.offset.click.left<=this.containment[2]?n:n-this.offset.click.left>=this.containment[0]?n-r.grid[0]:n+r.grid[0]:n)),{top:s-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():l?0:a.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():l?0:a.scrollLeft())}},_rearrange:function(t,e,i,n){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var r=this.counter;this._delay(function(){r===this.counter&&this.refreshPositions(!n)})},_clear:function(t,e){function i(t,e,i){return function(n){i._trigger(t,n,e._uiHash(e))}}this.reverting=!1;var n,r=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(n in this._storedCSS)"auto"!==this._storedCSS[n]&&"static"!==this._storedCSS[n]||(this._storedCSS[n]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&r.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||r.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(r.push(function(t){this._trigger("remove",t,this._uiHash())}),r.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),r.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),n=this.containers.length-1;n>=0;n--)e||r.push(i("deactivate",this,this.containers[n])),this.containers[n].containerCache.over&&(r.push(i("out",this,this.containers[n])),this.containers[n].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(n=0;n<r.length;n++)r[n].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}})}),function(t){"function"==typeof define&&define.amd?define(["jquery","./core","./widget","./button"],t):t(jQuery)}(function(t){function e(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}return t.widget("ui.spinner",{version:"1.11.4",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e={},i=this.element;return t.each(["min","max","step"],function(t,n){var r=i.attr(n);void 0!==r&&r.length&&(e[n]=r)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?void delete this.cancelBlur:(this._stop(),this._refresh(),void(this.previous!==this.element.val()&&this._trigger("change",t)))},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){function i(){var t=this.element[0]===this.document[0].activeElement;t||(this.element.focus(),this.previous=n,this._delay(function(){this.previous=n}))}var n;n=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),e.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(e)!==!1&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){if(t(e.currentTarget).hasClass("ui-state-active"))return this._start(e)!==!1&&void this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var t=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=t.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*t.height())&&t.height()>0&&t.height(t.height()),this.options.disabled&&this.disable()},_keydown:function(e){var i=this.options,n=t.ui.keyCode;switch(e.keyCode){case n.UP:return this._repeat(null,1,e),!0;case n.DOWN:return this._repeat(null,-1,e),!0;case n.PAGE_UP:return this._repeat(null,i.page,e),!0;case n.PAGE_DOWN:return this._repeat(null,-i.page,e),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>&#9650;</span></a><a class='ui-spinner-button ui-spinner-down ui-corner-br'><span class='ui-icon "+this.options.icons.down+"'>&#9660;</span></a>"},_start:function(t){return!(!this.spinning&&this._trigger("start",t)===!1)&&(this.counter||(this.counter=1),this.spinning=!0,!0)},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&this._trigger("spin",e,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=t.toString(),i=e.indexOf(".");return i===-1?0:e.length-i-1},_adjustValue:function(t){var e,i,n=this.options;return e=null!==n.min?n.min:0,i=t-e,i=Math.round(i/n.step)*n.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),null!==n.max&&t>n.max?n.max:null!==n.min&&t<n.min?n.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){if("culture"===t||"numberFormat"===t){var i=this._parse(this.element.val());return this.options[t]=e,void this.element.val(this._format(i))}"max"!==t&&"min"!==t&&"step"!==t||"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(e.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(e.down)),this._super(t,e),"disabled"===t&&(this.widget().toggleClass("ui-state-disabled",!!e),this.element.prop("disabled",!!e),this.buttons.button(e?"disable":"enable"))},_setOptions:e(function(t){this._super(t)}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var t=this.value();return null!==t&&t===this._adjustValue(t)},_value:function(t,e){var i;""!==t&&(i=this._parse(t),null!==i&&(e||(i=this._adjustValue(i)),t=this._format(i))),this.element.val(t),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:e(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:e(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:e(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:e(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){return arguments.length?void e(this._value).call(this,t):this._parse(this.element.val())},widget:function(){return this.uiSpinner}})}),function(t){"function"==typeof define&&define.amd?define(["jquery","./core","./widget"],t):t(jQuery)}(function(t){return t.widget("ui.tabs",{version:"1.11.4",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var t=/#.*$/;return function(e){var i,n;e=e.cloneNode(!1),i=e.href.replace(t,""),n=location.href.replace(t,"");try{i=decodeURIComponent(i)}catch(t){}try{n=decodeURIComponent(n)}catch(t){}return e.hash.length>1&&i===n}}(),_create:function(){var e=this,i=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",i.collapsible),this._processTabs(),i.active=this._initialActive(),t.isArray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),this.options.active!==!1&&this.anchors.length?this.active=this._findActive(i.active):this.active=t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var e=this.options.active,i=this.options.collapsible,n=location.hash.substring(1);return null===e&&(n&&this.tabs.each(function(i,r){if(t(r).attr("aria-controls")===n)return e=i,!1}),null===e&&(e=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),
null!==e&&e!==-1||(e=!!this.tabs.length&&0)),e!==!1&&(e=this.tabs.index(this.tabs.eq(e)),e===-1&&(e=!i&&0)),!i&&e===!1&&this.anchors.length&&(e=0),e},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(e){var i=t(this.document[0].activeElement).closest("li"),n=this.tabs.index(i),r=!0;if(!this._handlePageNav(e)){switch(e.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:n++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:r=!1,n--;break;case t.ui.keyCode.END:n=this.anchors.length-1;break;case t.ui.keyCode.HOME:n=0;break;case t.ui.keyCode.SPACE:return e.preventDefault(),clearTimeout(this.activating),void this._activate(n);case t.ui.keyCode.ENTER:return e.preventDefault(),clearTimeout(this.activating),void this._activate(n!==this.options.active&&n);default:return}e.preventDefault(),clearTimeout(this.activating),n=this._focusNextTab(n,r),e.ctrlKey||e.metaKey||(i.attr("aria-selected","false"),this.tabs.eq(n).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",n)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.focus())},_handlePageNav:function(e){return e.altKey&&e.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):e.altKey&&e.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(e,i){function n(){return e>r&&(e=0),e<0&&(e=r),e}for(var r=this.tabs.length-1;t.inArray(n(),this.options.disabled)!==-1;)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).focus(),t},_setOption:function(t,e){return"active"===t?void this._activate(e):"disabled"===t?void this._setupDisabled(e):(this._super(t,e),"collapsible"===t&&(this.element.toggleClass("ui-tabs-collapsible",e),e||this.options.active!==!1||this._activate(0)),"event"===t&&this._setupEvents(e),void("heightStyle"===t&&this._setupHeightStyle(e)))},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),e.active!==!1&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this,i=this.tabs,n=this.anchors,r=this.panels;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist").delegate("> li","mousedown"+this.eventNamespace,function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=t(),this.anchors.each(function(i,n){var r,o,s,a=t(n).uniqueId().attr("id"),l=t(n).closest("li"),u=l.attr("aria-controls");e._isLocal(n)?(r=n.hash,s=r.substring(1),o=e.element.find(e._sanitizeSelector(r))):(s=l.attr("aria-controls")||t({}).uniqueId()[0].id,r="#"+s,o=e.element.find(r),o.length||(o=e._createPanel(s),o.insertAfter(e.panels[i-1]||e.tablist)),o.attr("aria-live","polite")),o.length&&(e.panels=e.panels.add(o)),u&&l.data("ui-tabs-aria-controls",u),l.attr({"aria-controls":s,"aria-labelledby":a}),o.attr("aria-labelledby",a)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel"),i&&(this._off(i.not(this.tabs)),this._off(n.not(this.anchors)),this._off(r.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol,ul").eq(0)},_createPanel:function(e){return t("<div>").attr("id",e).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(e){t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1);for(var i,n=0;i=this.tabs[n];n++)e===!0||t.inArray(n,e)!==-1?t(i).addClass("ui-state-disabled").attr("aria-disabled","true"):t(i).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=e},_setupEvents:function(e){var i={};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(t){t.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var i,n=this.element.parent();"fill"===e?(i=n.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),n=e.css("position");"absolute"!==n&&"fixed"!==n&&(i-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,n=this.active,r=t(e.currentTarget),o=r.closest("li"),s=o[0]===n[0],a=s&&i.collapsible,l=a?t():this._getPanelForTab(o),u=n.length?this._getPanelForTab(n):t(),c={oldTab:n,oldPanel:u,newTab:a?t():o,newPanel:l};e.preventDefault(),o.hasClass("ui-state-disabled")||o.hasClass("ui-tabs-loading")||this.running||s&&!i.collapsible||this._trigger("beforeActivate",e,c)===!1||(i.active=!a&&this.tabs.index(o),this.active=s?t():o,this.xhr&&this.xhr.abort(),u.length||l.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),l.length&&this.load(this.tabs.index(o),e),this._toggle(e,c))},_toggle:function(e,i){function n(){o.running=!1,o._trigger("activate",e,i)}function r(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),s.length&&o.options.show?o._show(s,o.options.show,n):(s.show(),n())}var o=this,s=i.newPanel,a=i.oldPanel;this.running=!0,a.length&&this.options.hide?this._hide(a,this.options.hide,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),r()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),a.hide(),r()),a.attr("aria-hidden","true"),i.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),s.length&&a.length?i.oldTab.attr("tabIndex",-1):s.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),s.attr("aria-hidden","false"),i.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(e){var i,n=this._findActive(e);n[0]!==this.active[0]&&(n.length||(n=this.active),i=n.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return e===!1?t():this.tabs.eq(e)},_getIndex:function(t){return"string"==typeof t&&(t=this.anchors.index(this.anchors.filter("[href$='"+t+"']"))),t},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tablist.unbind(this.eventNamespace),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(e){var i=this.options.disabled;i!==!1&&(void 0===e?i=!1:(e=this._getIndex(e),i=t.isArray(i)?t.map(i,function(t){return t!==e?t:null}):t.map(this.tabs,function(t,i){return i!==e?i:null})),this._setupDisabled(i))},disable:function(e){var i=this.options.disabled;if(i!==!0){if(void 0===e)i=!0;else{if(e=this._getIndex(e),t.inArray(e,i)!==-1)return;i=t.isArray(i)?t.merge([e],i).sort():[e]}this._setupDisabled(i)}},load:function(e,i){e=this._getIndex(e);var n=this,r=this.tabs.eq(e),o=r.find(".ui-tabs-anchor"),s=this._getPanelForTab(r),a={tab:r,panel:s},l=function(t,e){"abort"===e&&n.panels.stop(!1,!0),r.removeClass("ui-tabs-loading"),s.removeAttr("aria-busy"),t===n.xhr&&delete n.xhr};this._isLocal(o[0])||(this.xhr=t.ajax(this._ajaxSettings(o,i,a)),this.xhr&&"canceled"!==this.xhr.statusText&&(r.addClass("ui-tabs-loading"),s.attr("aria-busy","true"),this.xhr.done(function(t,e,r){setTimeout(function(){s.html(t),n._trigger("load",i,a),l(r,e)},1)}).fail(function(t,e){setTimeout(function(){l(t,e)},1)})))},_ajaxSettings:function(e,i,n){var r=this;return{url:e.attr("href"),beforeSend:function(e,o){return r._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:o},n))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}})}),function(t){"function"==typeof define&&define.amd?define(["jquery","./core","./widget","./position"],t):t(jQuery)}(function(t){return t.widget("ui.tooltip",{version:"1.11.4",options:{content:function(){var e=t(this).attr("title")||"";return t("<a>").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_addDescribedBy:function(e,i){var n=(e.attr("aria-describedby")||"").split(/\s+/);n.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(n.join(" ")))},_removeDescribedBy:function(e){var i=e.data("ui-tooltip-id"),n=(e.attr("aria-describedby")||"").split(/\s+/),r=t.inArray(i,n);r!==-1&&n.splice(r,1),e.removeData("ui-tooltip-id"),n=t.trim(n.join(" ")),n?e.attr("aria-describedby",n):e.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable(),this.liveRegion=t("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body)},_setOption:function(e,i){var n=this;return"disabled"===e?(this[i?"_disable":"_enable"](),void(this.options[e]=i)):(this._super(e,i),void("content"===e&&t.each(this.tooltips,function(t,e){n._updateContent(e.element)})))},_disable:function(){var e=this;t.each(this.tooltips,function(i,n){var r=t.Event("blur");r.target=r.currentTarget=n.element[0],e.close(r,!0)}),this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.is("[title]")&&e.data("ui-tooltip-title",e.attr("title")).removeAttr("title")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))})},open:function(e){var i=this,n=t(e?e.target:this.element).closest(this.options.items);n.length&&!n.data("ui-tooltip-id")&&(n.attr("title")&&n.data("ui-tooltip-title",n.attr("title")),n.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&n.parents().each(function(){var e,n=t(this);n.data("ui-tooltip-open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,i.close(e,!0)),n.attr("title")&&(n.uniqueId(),i.parents[this.id]={element:this,title:n.attr("title")},n.attr("title",""))}),this._registerCloseHandlers(e,n),this._updateContent(n,e))},_updateContent:function(t,e){var i,n=this.options.content,r=this,o=e?e.type:null;return"string"==typeof n?this._open(e,t,n):(i=n.call(t[0],function(i){r._delay(function(){t.data("ui-tooltip-open")&&(e&&(e.type=o),this._open(e,t,i))})}),void(i&&this._open(e,t,i)))},_open:function(e,i,n){function r(t){u.of=t,s.is(":hidden")||s.position(u)}var o,s,a,l,u=t.extend({},this.options.position);if(n){if(o=this._find(i))return void o.tooltip.find(".ui-tooltip-content").html(n);i.is("[title]")&&(e&&"mouseover"===e.type?i.attr("title",""):i.removeAttr("title")),o=this._tooltip(i),s=o.tooltip,this._addDescribedBy(i,s.attr("id")),s.find(".ui-tooltip-content").html(n),this.liveRegion.children().hide(),n.clone?(l=n.clone(),l.removeAttr("id").find("[id]").removeAttr("id")):l=n,t("<div>").html(l).appendTo(this.liveRegion),this.options.track&&e&&/^mouse/.test(e.type)?(this._on(this.document,{mousemove:r}),r(e)):s.position(t.extend({of:i},this.options.position)),s.hide(),this._show(s,this.options.show),this.options.show&&this.options.show.delay&&(a=this.delayedShow=setInterval(function(){s.is(":visible")&&(r(u.of),clearInterval(a))},t.fx.interval)),this._trigger("open",e,{tooltip:s})}},_registerCloseHandlers:function(e,i){var n={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var n=t.Event(e);n.currentTarget=i[0],this.close(n,!0)}}};i[0]!==this.element[0]&&(n.remove=function(){this._removeTooltip(this._find(i).tooltip)}),e&&"mouseover"!==e.type||(n.mouseleave="close"),e&&"focusin"!==e.type||(n.focusout="close"),this._on(!0,i,n)},close:function(e){var i,n=this,r=t(e?e.currentTarget:this.element),o=this._find(r);return o?(i=o.tooltip,void(o.closing||(clearInterval(this.delayedShow),r.data("ui-tooltip-title")&&!r.attr("title")&&r.attr("title",r.data("ui-tooltip-title")),this._removeDescribedBy(r),o.hiding=!0,i.stop(!0),this._hide(i,this.options.hide,function(){n._removeTooltip(t(this))}),r.removeData("ui-tooltip-open"),this._off(r,"mouseleave focusout keyup"),r[0]!==this.element[0]&&this._off(r,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete n.parents[e]}),o.closing=!0,this._trigger("close",e,{tooltip:i}),o.hiding||(o.closing=!1)))):void r.removeData("ui-tooltip-open")},_tooltip:function(e){var i=t("<div>").attr("role","tooltip").addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||"")),n=i.uniqueId().attr("id");return t("<div>").addClass("ui-tooltip-content").appendTo(i),i.appendTo(this.document[0].body),this.tooltips[n]={element:e,tooltip:i}},_find:function(t){var e=t.data("ui-tooltip-id");return e?this.tooltips[e]:null},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_destroy:function(){var e=this;t.each(this.tooltips,function(i,n){var r=t.Event("blur"),o=n.element;r.target=r.currentTarget=o[0],e.close(r,!0),t("#"+i).remove(),o.data("ui-tooltip-title")&&(o.attr("title")||o.attr("title",o.data("ui-tooltip-title")),o.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}})});
This file has been truncated, but you can view the full file.
/*!
* Chart.js
* http://chartjs.org/
* Version: 2.2.2
*
* Copyright 2016 Nick Downie
* Released under the MIT license
* https://github.com/chartjs/Chart.js/blob/master/LICENSE.md
*/
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Chart = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
/* MIT license */
var colorNames = require(5);
module.exports = {
getRgba: getRgba,
getHsla: getHsla,
getRgb: getRgb,
getHsl: getHsl,
getHwb: getHwb,
getAlpha: getAlpha,
hexString: hexString,
rgbString: rgbString,
rgbaString: rgbaString,
percentString: percentString,
percentaString: percentaString,
hslString: hslString,
hslaString: hslaString,
hwbString: hwbString,
keyword: keyword
}
function getRgba(string) {
if (!string) {
return;
}
var abbr = /^#([a-fA-F0-9]{3})$/,
hex = /^#([a-fA-F0-9]{6})$/,
rgba = /^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/,
per = /^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/,
keyword = /(\w+)/;
var rgb = [0, 0, 0],
a = 1,
match = string.match(abbr);
if (match) {
match = match[1];
for (var i = 0; i < rgb.length; i++) {
rgb[i] = parseInt(match[i] + match[i], 16);
}
}
else if (match = string.match(hex)) {
match = match[1];
for (var i = 0; i < rgb.length; i++) {
rgb[i] = parseInt(match.slice(i * 2, i * 2 + 2), 16);
}
}
else if (match = string.match(rgba)) {
for (var i = 0; i < rgb.length; i++) {
rgb[i] = parseInt(match[i + 1]);
}
a = parseFloat(match[4]);
}
else if (match = string.match(per)) {
for (var i = 0; i < rgb.length; i++) {
rgb[i] = Math.round(parseFloat(match[i + 1]) * 2.55);
}
a = parseFloat(match[4]);
}
else if (match = string.match(keyword)) {
if (match[1] == "transparent") {
return [0, 0, 0, 0];
}
rgb = colorNames[match[1]];
if (!rgb) {
return;
}
}
for (var i = 0; i < rgb.length; i++) {
rgb[i] = scale(rgb[i], 0, 255);
}
if (!a && a != 0) {
a = 1;
}
else {
a = scale(a, 0, 1);
}
rgb[3] = a;
return rgb;
}
function getHsla(string) {
if (!string) {
return;
}
var hsl = /^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/;
var match = string.match(hsl);
if (match) {
var alpha = parseFloat(match[4]);
var h = scale(parseInt(match[1]), 0, 360),
s = scale(parseFloat(match[2]), 0, 100),
l = scale(parseFloat(match[3]), 0, 100),
a = scale(isNaN(alpha) ? 1 : alpha, 0, 1);
return [h, s, l, a];
}
}
function getHwb(string) {
if (!string) {
return;
}
var hwb = /^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/;
var match = string.match(hwb);
if (match) {
var alpha = parseFloat(match[4]);
var h = scale(parseInt(match[1]), 0, 360),
w = scale(parseFloat(match[2]), 0, 100),
b = scale(parseFloat(match[3]), 0, 100),
a = scale(isNaN(alpha) ? 1 : alpha, 0, 1);
return [h, w, b, a];
}
}
function getRgb(string) {
var rgba = getRgba(string);
return rgba && rgba.slice(0, 3);
}
function getHsl(string) {
var hsla = getHsla(string);
return hsla && hsla.slice(0, 3);
}
function getAlpha(string) {
var vals = getRgba(string);
if (vals) {
return vals[3];
}
else if (vals = getHsla(string)) {
return vals[3];
}
else if (vals = getHwb(string)) {
return vals[3];
}
}
// generators
function hexString(rgb) {
return "#" + hexDouble(rgb[0]) + hexDouble(rgb[1])
+ hexDouble(rgb[2]);
}
function rgbString(rgba, alpha) {
if (alpha < 1 || (rgba[3] && rgba[3] < 1)) {
return rgbaString(rgba, alpha);
}
return "rgb(" + rgba[0] + ", " + rgba[1] + ", " + rgba[2] + ")";
}
function rgbaString(rgba, alpha) {
if (alpha === undefined) {
alpha = (rgba[3] !== undefined ? rgba[3] : 1);
}
return "rgba(" + rgba[0] + ", " + rgba[1] + ", " + rgba[2]
+ ", " + alpha + ")";
}
function percentString(rgba, alpha) {
if (alpha < 1 || (rgba[3] && rgba[3] < 1)) {
return percentaString(rgba, alpha);
}
var r = Math.round(rgba[0]/255 * 100),
g = Math.round(rgba[1]/255 * 100),
b = Math.round(rgba[2]/255 * 100);
return "rgb(" + r + "%, " + g + "%, " + b + "%)";
}
function percentaString(rgba, alpha) {
var r = Math.round(rgba[0]/255 * 100),
g = Math.round(rgba[1]/255 * 100),
b = Math.round(rgba[2]/255 * 100);
return "rgba(" + r + "%, " + g + "%, " + b + "%, " + (alpha || rgba[3] || 1) + ")";
}
function hslString(hsla, alpha) {
if (alpha < 1 || (hsla[3] && hsla[3] < 1)) {
return hslaString(hsla, alpha);
}
return "hsl(" + hsla[0] + ", " + hsla[1] + "%, " + hsla[2] + "%)";
}
function hslaString(hsla, alpha) {
if (alpha === undefined) {
alpha = (hsla[3] !== undefined ? hsla[3] : 1);
}
return "hsla(" + hsla[0] + ", " + hsla[1] + "%, " + hsla[2] + "%, "
+ alpha + ")";
}
// hwb is a bit different than rgb(a) & hsl(a) since there is no alpha specific syntax
// (hwb have alpha optional & 1 is default value)
function hwbString(hwb, alpha) {
if (alpha === undefined) {
alpha = (hwb[3] !== undefined ? hwb[3] : 1);
}
return "hwb(" + hwb[0] + ", " + hwb[1] + "%, " + hwb[2] + "%"
+ (alpha !== undefined && alpha !== 1 ? ", " + alpha : "") + ")";
}
function keyword(rgb) {
return reverseNames[rgb.slice(0, 3)];
}
// helpers
function scale(num, min, max) {
return Math.min(Math.max(min, num), max);
}
function hexDouble(num) {
var str = num.toString(16).toUpperCase();
return (str.length < 2) ? "0" + str : str;
}
//create a list of reverse color names
var reverseNames = {};
for (var name in colorNames) {
reverseNames[colorNames[name]] = name;
}
},{"5":5}],2:[function(require,module,exports){
/* MIT license */
var convert = require(4);
var string = require(1);
var Color = function (obj) {
if (obj instanceof Color) {
return obj;
}
if (!(this instanceof Color)) {
return new Color(obj);
}
this.values = {
rgb: [0, 0, 0],
hsl: [0, 0, 0],
hsv: [0, 0, 0],
hwb: [0, 0, 0],
cmyk: [0, 0, 0, 0],
alpha: 1
};
// parse Color() argument
var vals;
if (typeof obj === 'string') {
vals = string.getRgba(obj);
if (vals) {
this.setValues('rgb', vals);
} else if (vals = string.getHsla(obj)) {
this.setValues('hsl', vals);
} else if (vals = string.getHwb(obj)) {
this.setValues('hwb', vals);
} else {
throw new Error('Unable to parse color from string "' + obj + '"');
}
} else if (typeof obj === 'object') {
vals = obj;
if (vals.r !== undefined || vals.red !== undefined) {
this.setValues('rgb', vals);
} else if (vals.l !== undefined || vals.lightness !== undefined) {
this.setValues('hsl', vals);
} else if (vals.v !== undefined || vals.value !== undefined) {
this.setValues('hsv', vals);
} else if (vals.w !== undefined || vals.whiteness !== undefined) {
this.setValues('hwb', vals);
} else if (vals.c !== undefined || vals.cyan !== undefined) {
this.setValues('cmyk', vals);
} else {
throw new Error('Unable to parse color from object ' + JSON.stringify(obj));
}
}
};
Color.prototype = {
rgb: function () {
return this.setSpace('rgb', arguments);
},
hsl: function () {
return this.setSpace('hsl', arguments);
},
hsv: function () {
return this.setSpace('hsv', arguments);
},
hwb: function () {
return this.setSpace('hwb', arguments);
},
cmyk: function () {
return this.setSpace('cmyk', arguments);
},
rgbArray: function () {
return this.values.rgb;
},
hslArray: function () {
return this.values.hsl;
},
hsvArray: function () {
return this.values.hsv;
},
hwbArray: function () {
var values = this.values;
if (values.alpha !== 1) {
return values.hwb.concat([values.alpha]);
}
return values.hwb;
},
cmykArray: function () {
return this.values.cmyk;
},
rgbaArray: function () {
var values = this.values;
return values.rgb.concat([values.alpha]);
},
hslaArray: function () {
var values = this.values;
return values.hsl.concat([values.alpha]);
},
alpha: function (val) {
if (val === undefined) {
return this.values.alpha;
}
this.setValues('alpha', val);
return this;
},
red: function (val) {
return this.setChannel('rgb', 0, val);
},
green: function (val) {
return this.setChannel('rgb', 1, val);
},
blue: function (val) {
return this.setChannel('rgb', 2, val);
},
hue: function (val) {
if (val) {
val %= 360;
val = val < 0 ? 360 + val : val;
}
return this.setChannel('hsl', 0, val);
},
saturation: function (val) {
return this.setChannel('hsl', 1, val);
},
lightness: function (val) {
return this.setChannel('hsl', 2, val);
},
saturationv: function (val) {
return this.setChannel('hsv', 1, val);
},
whiteness: function (val) {
return this.setChannel('hwb', 1, val);
},
blackness: function (val) {
return this.setChannel('hwb', 2, val);
},
value: function (val) {
return this.setChannel('hsv', 2, val);
},
cyan: function (val) {
return this.setChannel('cmyk', 0, val);
},
magenta: function (val) {
return this.setChannel('cmyk', 1, val);
},
yellow: function (val) {
return this.setChannel('cmyk', 2, val);
},
black: function (val) {
return this.setChannel('cmyk', 3, val);
},
hexString: function () {
return string.hexString(this.values.rgb);
},
rgbString: function () {
return string.rgbString(this.values.rgb, this.values.alpha);
},
rgbaString: function () {
return string.rgbaString(this.values.rgb, this.values.alpha);
},
percentString: function () {
return string.percentString(this.values.rgb, this.values.alpha);
},
hslString: function () {
return string.hslString(this.values.hsl, this.values.alpha);
},
hslaString: function () {
return string.hslaString(this.values.hsl, this.values.alpha);
},
hwbString: function () {
return string.hwbString(this.values.hwb, this.values.alpha);
},
keyword: function () {
return string.keyword(this.values.rgb, this.values.alpha);
},
rgbNumber: function () {
var rgb = this.values.rgb;
return (rgb[0] << 16) | (rgb[1] << 8) | rgb[2];
},
luminosity: function () {
// http://www.w3.org/TR/WCAG20/#relativeluminancedef
var rgb = this.values.rgb;
var lum = [];
for (var i = 0; i < rgb.length; i++) {
var chan = rgb[i] / 255;
lum[i] = (chan <= 0.03928) ? chan / 12.92 : Math.pow(((chan + 0.055) / 1.055), 2.4);
}
return 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2];
},
contrast: function (color2) {
// http://www.w3.org/TR/WCAG20/#contrast-ratiodef
var lum1 = this.luminosity();
var lum2 = color2.luminosity();
if (lum1 > lum2) {
return (lum1 + 0.05) / (lum2 + 0.05);
}
return (lum2 + 0.05) / (lum1 + 0.05);
},
level: function (color2) {
var contrastRatio = this.contrast(color2);
if (contrastRatio >= 7.1) {
return 'AAA';
}
return (contrastRatio >= 4.5) ? 'AA' : '';
},
dark: function () {
// YIQ equation from http://24ways.org/2010/calculating-color-contrast
var rgb = this.values.rgb;
var yiq = (rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1000;
return yiq < 128;
},
light: function () {
return !this.dark();
},
negate: function () {
var rgb = [];
for (var i = 0; i < 3; i++) {
rgb[i] = 255 - this.values.rgb[i];
}
this.setValues('rgb', rgb);
return this;
},
lighten: function (ratio) {
var hsl = this.values.hsl;
hsl[2] += hsl[2] * ratio;
this.setValues('hsl', hsl);
return this;
},
darken: function (ratio) {
var hsl = this.values.hsl;
hsl[2] -= hsl[2] * ratio;
this.setValues('hsl', hsl);
return this;
},
saturate: function (ratio) {
var hsl = this.values.hsl;
hsl[1] += hsl[1] * ratio;
this.setValues('hsl', hsl);
return this;
},
desaturate: function (ratio) {
var hsl = this.values.hsl;
hsl[1] -= hsl[1] * ratio;
this.setValues('hsl', hsl);
return this;
},
whiten: function (ratio) {
var hwb = this.values.hwb;
hwb[1] += hwb[1] * ratio;
this.setValues('hwb', hwb);
return this;
},
blacken: function (ratio) {
var hwb = this.values.hwb;
hwb[2] += hwb[2] * ratio;
this.setValues('hwb', hwb);
return this;
},
greyscale: function () {
var rgb = this.values.rgb;
// http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale
var val = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11;
this.setValues('rgb', [val, val, val]);
return this;
},
clearer: function (ratio) {
var alpha = this.values.alpha;
this.setValues('alpha', alpha - (alpha * ratio));
return this;
},
opaquer: function (ratio) {
var alpha = this.values.alpha;
this.setValues('alpha', alpha + (alpha * ratio));
return this;
},
rotate: function (degrees) {
var hsl = this.values.hsl;
var hue = (hsl[0] + degrees) % 360;
hsl[0] = hue < 0 ? 360 + hue : hue;
this.setValues('hsl', hsl);
return this;
},
/**
* Ported from sass implementation in C
* https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209
*/
mix: function (mixinColor, weight) {
var color1 = this;
var color2 = mixinColor;
var p = weight === undefined ? 0.5 : weight;
var w = 2 * p - 1;
var a = color1.alpha() - color2.alpha();
var w1 = (((w * a === -1) ? w : (w + a) / (1 + w * a)) + 1) / 2.0;
var w2 = 1 - w1;
return this
.rgb(
w1 * color1.red() + w2 * color2.red(),
w1 * color1.green() + w2 * color2.green(),
w1 * color1.blue() + w2 * color2.blue()
)
.alpha(color1.alpha() * p + color2.alpha() * (1 - p));
},
toJSON: function () {
return this.rgb();
},
clone: function () {
// NOTE(SB): using node-clone creates a dependency to Buffer when using browserify,
// making the final build way to big to embed in Chart.js. So let's do it manually,
// assuming that values to clone are 1 dimension arrays containing only numbers,
// except 'alpha' which is a number.
var result = new Color();
var source = this.values;
var target = result.values;
var value, type;
for (var prop in source) {
if (source.hasOwnProperty(prop)) {
value = source[prop];
type = ({}).toString.call(value);
if (type === '[object Array]') {
target[prop] = value.slice(0);
} else if (type === '[object Number]') {
target[prop] = value;
} else {
console.error('unexpected color value:', value);
}
}
}
return result;
}
};
Color.prototype.spaces = {
rgb: ['red', 'green', 'blue'],
hsl: ['hue', 'saturation', 'lightness'],
hsv: ['hue', 'saturation', 'value'],
hwb: ['hue', 'whiteness', 'blackness'],
cmyk: ['cyan', 'magenta', 'yellow', 'black']
};
Color.prototype.maxes = {
rgb: [255, 255, 255],
hsl: [360, 100, 100],
hsv: [360, 100, 100],
hwb: [360, 100, 100],
cmyk: [100, 100, 100, 100]
};
Color.prototype.getValues = function (space) {
var values = this.values;
var vals = {};
for (var i = 0; i < space.length; i++) {
vals[space.charAt(i)] = values[space][i];
}
if (values.alpha !== 1) {
vals.a = values.alpha;
}
// {r: 255, g: 255, b: 255, a: 0.4}
return vals;
};
Color.prototype.setValues = function (space, vals) {
var values = this.values;
var spaces = this.spaces;
var maxes = this.maxes;
var alpha = 1;
var i;
if (space === 'alpha') {
alpha = vals;
} else if (vals.length) {
// [10, 10, 10]
values[space] = vals.slice(0, space.length);
alpha = vals[space.length];
} else if (vals[space.charAt(0)] !== undefined) {
// {r: 10, g: 10, b: 10}
for (i = 0; i < space.length; i++) {
values[space][i] = vals[space.charAt(i)];
}
alpha = vals.a;
} else if (vals[spaces[space][0]] !== undefined) {
// {red: 10, green: 10, blue: 10}
var chans = spaces[space];
for (i = 0; i < space.length; i++) {
values[space][i] = vals[chans[i]];
}
alpha = vals.alpha;
}
values.alpha = Math.max(0, Math.min(1, (alpha === undefined ? values.alpha : alpha)));
if (space === 'alpha') {
return false;
}
var capped;
// cap values of the space prior converting all values
for (i = 0; i < space.length; i++) {
capped = Math.max(0, Math.min(maxes[space][i], values[space][i]));
values[space][i] = Math.round(capped);
}
// convert to all the other color spaces
for (var sname in spaces) {
if (sname !== space) {
values[sname] = convert[space][sname](values[space]);
}
}
return true;
};
Color.prototype.setSpace = function (space, args) {
var vals = args[0];
if (vals === undefined) {
// color.rgb()
return this.getValues(space);
}
// color.rgb(10, 10, 10)
if (typeof vals === 'number') {
vals = Array.prototype.slice.call(args);
}
this.setValues(space, vals);
return this;
};
Color.prototype.setChannel = function (space, index, val) {
var svalues = this.values[space];
if (val === undefined) {
// color.red()
return svalues[index];
} else if (val === svalues[index]) {
// color.red(color.red())
return this;
}
// color.red(100)
svalues[index] = val;
this.setValues(space, svalues);
return this;
};
if (typeof window !== 'undefined') {
window.Color = Color;
}
module.exports = Color;
},{"1":1,"4":4}],3:[function(require,module,exports){
/* MIT license */
module.exports = {
rgb2hsl: rgb2hsl,
rgb2hsv: rgb2hsv,
rgb2hwb: rgb2hwb,
rgb2cmyk: rgb2cmyk,
rgb2keyword: rgb2keyword,
rgb2xyz: rgb2xyz,
rgb2lab: rgb2lab,
rgb2lch: rgb2lch,
hsl2rgb: hsl2rgb,
hsl2hsv: hsl2hsv,
hsl2hwb: hsl2hwb,
hsl2cmyk: hsl2cmyk,
hsl2keyword: hsl2keyword,
hsv2rgb: hsv2rgb,
hsv2hsl: hsv2hsl,
hsv2hwb: hsv2hwb,
hsv2cmyk: hsv2cmyk,
hsv2keyword: hsv2keyword,
hwb2rgb: hwb2rgb,
hwb2hsl: hwb2hsl,
hwb2hsv: hwb2hsv,
hwb2cmyk: hwb2cmyk,
hwb2keyword: hwb2keyword,
cmyk2rgb: cmyk2rgb,
cmyk2hsl: cmyk2hsl,
cmyk2hsv: cmyk2hsv,
cmyk2hwb: cmyk2hwb,
cmyk2keyword: cmyk2keyword,
keyword2rgb: keyword2rgb,
keyword2hsl: keyword2hsl,
keyword2hsv: keyword2hsv,
keyword2hwb: keyword2hwb,
keyword2cmyk: keyword2cmyk,
keyword2lab: keyword2lab,
keyword2xyz: keyword2xyz,
xyz2rgb: xyz2rgb,
xyz2lab: xyz2lab,
xyz2lch: xyz2lch,
lab2xyz: lab2xyz,
lab2rgb: lab2rgb,
lab2lch: lab2lch,
lch2lab: lch2lab,
lch2xyz: lch2xyz,
lch2rgb: lch2rgb
}
function rgb2hsl(rgb) {
var r = rgb[0]/255,
g = rgb[1]/255,
b = rgb[2]/255,
min = Math.min(r, g, b),
max = Math.max(r, g, b),
delta = max - min,
h, s, l;
if (max == min)
h = 0;
else if (r == max)
h = (g - b) / delta;
else if (g == max)
h = 2 + (b - r) / delta;
else if (b == max)
h = 4 + (r - g)/ delta;
h = Math.min(h * 60, 360);
if (h < 0)
h += 360;
l = (min + max) / 2;
if (max == min)
s = 0;
else if (l <= 0.5)
s = delta / (max + min);
else
s = delta / (2 - max - min);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment