From 2c6643d6911ed901a374fa480683a9f01e7cbd0d Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 18 Apr 2016 14:15:10 +0200 Subject: [PATCH 01/34] Fix #243 --- app/Helpers/Csv/Converter/AssetAccountIban.php | 2 +- app/Helpers/Csv/Converter/AssetAccountName.php | 2 +- app/Helpers/Csv/Converter/AssetAccountNumber.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Helpers/Csv/Converter/AssetAccountIban.php b/app/Helpers/Csv/Converter/AssetAccountIban.php index 19e0a8aec0..ac24b3a4a2 100644 --- a/app/Helpers/Csv/Converter/AssetAccountIban.php +++ b/app/Helpers/Csv/Converter/AssetAccountIban.php @@ -26,7 +26,7 @@ class AssetAccountIban extends BasicConverter implements ConverterInterface // is mapped? Then it's easy! if (isset($this->mapped[$this->index][$this->value])) { - $account = $repository->find($this->mapped[$this->index][$this->value]); + $account = $repository->find(intval($this->mapped[$this->index][$this->value])); Log::debug('Found mapped account for value "' . $this->value . '". It is account #' . $account->id); return $account; diff --git a/app/Helpers/Csv/Converter/AssetAccountName.php b/app/Helpers/Csv/Converter/AssetAccountName.php index 72f4653605..69271e1b22 100644 --- a/app/Helpers/Csv/Converter/AssetAccountName.php +++ b/app/Helpers/Csv/Converter/AssetAccountName.php @@ -25,7 +25,7 @@ class AssetAccountName extends BasicConverter implements ConverterInterface // is mapped? Then it's easy! if (isset($this->mapped[$this->index][$this->value])) { - $account = $repository->find($this->mapped[$this->index][$this->value]); + $account = $repository->find(intval($this->mapped[$this->index][$this->value])); return $account; } diff --git a/app/Helpers/Csv/Converter/AssetAccountNumber.php b/app/Helpers/Csv/Converter/AssetAccountNumber.php index b61e35fb70..ece314361c 100644 --- a/app/Helpers/Csv/Converter/AssetAccountNumber.php +++ b/app/Helpers/Csv/Converter/AssetAccountNumber.php @@ -34,7 +34,7 @@ class AssetAccountNumber extends BasicConverter implements ConverterInterface // is mapped? Then it's easy! if (isset($this->mapped[$this->index][$this->value])) { - $account = $repository->find($this->mapped[$this->index][$this->value]); + $account = $repository->find(intval($this->mapped[$this->index][$this->value])); return $account; } From 87b72e4bcda6370e4ed5959a405b78c49d20c371 Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 18 Apr 2016 19:33:02 +0200 Subject: [PATCH 02/34] Fix #245 --- app/Repositories/Bill/BillRepository.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/Repositories/Bill/BillRepository.php b/app/Repositories/Bill/BillRepository.php index 7420b1f902..b371d9df23 100644 --- a/app/Repositories/Bill/BillRepository.php +++ b/app/Repositories/Bill/BillRepository.php @@ -370,8 +370,7 @@ class BillRepository implements BillRepositoryInterface */ public function getRanges(Bill $bill, Carbon $start, Carbon $end): array { - $startOfBill = $bill->date; - $startOfBill = Navigation::startOfPeriod($startOfBill, $bill->repeat_freq); + $startOfBill = Navigation::startOfPeriod($start, $bill->repeat_freq); // all periods of this bill up until the current period: From cce4ef19e55b9da50f089760da62eb7aa5cdd4c2 Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 18 Apr 2016 19:34:15 +0200 Subject: [PATCH 03/34] Fix #244 --- app/Helpers/Csv/Importer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Helpers/Csv/Importer.php b/app/Helpers/Csv/Importer.php index 90aadc3a0e..78f75a16df 100644 --- a/app/Helpers/Csv/Importer.php +++ b/app/Helpers/Csv/Importer.php @@ -28,7 +28,7 @@ class Importer /** @var Data */ protected $data; /** @var array */ - protected $errors; + protected $errors = []; /** @var array */ protected $importData; /** @var array */ From a6f3e61520929b61df2fd4b0181fe655bfe4dc0f Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 18 Apr 2016 19:41:16 +0200 Subject: [PATCH 04/34] Fix #248 --- app/Export/Entry.php | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/app/Export/Entry.php b/app/Export/Entry.php index 4d6ea90311..521f7928e0 100644 --- a/app/Export/Entry.php +++ b/app/Export/Entry.php @@ -58,6 +58,7 @@ class Entry public $fromAccountId; /** @var string */ public $fromAccountName; + /** @var int */ public $fromAccountNumber; /** @var string */ public $fromAccountType; @@ -132,23 +133,25 @@ class Entry // key = field name (see top of class) // value = field type (see csv.php under 'roles') return [ - 'amount' => 'amount', - 'date' => 'date-transaction', - 'description' => 'description', - 'billId' => 'bill-id', - 'billName' => 'bill-name', - 'budgetId' => 'budget-id', - 'budgetName' => 'budget-name', - 'categoryId' => 'category-id', - 'categoryName' => 'category-name', - 'fromAccountId' => 'account-id', - 'fromAccountName' => 'account-name', - 'fromAccountIban' => 'account-iban', - 'fromAccountType' => '_ignore', // no, Firefly cannot import what it exports. I know :D - 'toAccountId' => 'opposing-id', - 'toAccountName' => 'opposing-name', - 'toAccountIban' => 'opposing-iban', - 'toAccountType' => '_ignore', + 'amount' => 'amount', + 'date' => 'date-transaction', + 'description' => 'description', + 'billId' => 'bill-id', + 'billName' => 'bill-name', + 'budgetId' => 'budget-id', + 'budgetName' => 'budget-name', + 'categoryId' => 'category-id', + 'categoryName' => 'category-name', + 'fromAccountId' => 'account-id', + 'fromAccountNumber' => 'account-number', + 'fromAccountName' => 'account-name', + 'fromAccountIban' => 'account-iban', + 'fromAccountType' => '_ignore', // no, Firefly cannot import what it exports. I know :D + 'toAccountId' => 'opposing-id', + 'toAccountNumber' => 'account-number', + 'toAccountName' => 'opposing-name', + 'toAccountIban' => 'opposing-iban', + 'toAccountType' => '_ignore', ]; } From 4b80e46d2606263af2b304a33dcaea0ddfdec2d5 Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 18 Apr 2016 19:55:48 +0200 Subject: [PATCH 05/34] Fix old bug. --- resources/lang/en_US/firefly.php | 1 + resources/views/transactions/create.twig | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/resources/lang/en_US/firefly.php b/resources/lang/en_US/firefly.php index 6012ffe926..8c9206bfe1 100644 --- a/resources/lang/en_US/firefly.php +++ b/resources/lang/en_US/firefly.php @@ -69,6 +69,7 @@ return [ 'warning_much_data' => ':days days of data may take a while to load.', 'registered' => 'You have registered successfully!', 'search' => 'Search', + 'no_budget_pointer' => 'You seem to have no budgets yet. You should create some on the budgets-page. Budgets can help you keep track of expenses.', // account confirmation: 'confirm_account_header' => 'Please confirm your account', diff --git a/resources/views/transactions/create.twig b/resources/views/transactions/create.twig index be67202fde..8d10ff20ae 100644 --- a/resources/views/transactions/create.twig +++ b/resources/views/transactions/create.twig @@ -63,7 +63,14 @@
- {{ ExpandedForm.select('budget_id',budgets,0) }} + {% if budgets|length > 0 %} + {{ ExpandedForm.select('budget_id',budgets,0) }} + {% else %} + {{ ExpandedForm.select('budget_id',budgets,0, {helpText: trans('firefly.no_budget_pointer')}) }} + {% endif %} + + + {{ ExpandedForm.text('category') }} From c56a39a7263e1180bb98704ed2203bc06432bebc Mon Sep 17 00:00:00 2001 From: James Cole Date: Wed, 20 Apr 2016 13:54:13 +0200 Subject: [PATCH 06/34] Update chart js. [skip ci] --- public/js/lib/Chart.bundle.min.js | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/public/js/lib/Chart.bundle.min.js b/public/js/lib/Chart.bundle.min.js index 0eca53259b..bd2f96b501 100755 --- a/public/js/lib/Chart.bundle.min.js +++ b/public/js/lib/Chart.bundle.min.js @@ -1,15 +1,21 @@ -!function t(e,i,s){function a(n,r){if(!i[n]){if(!e[n]){var l="function"==typeof require&&require;if(!r&&l)return l(n,!0);if(o)return o(n,!0);var h=new Error("Cannot find module '"+n+"'");throw h.code="MODULE_NOT_FOUND",h}var c=i[n]={exports:{}};e[n][0].call(c.exports,function(t){var i=e[n][1][t];return a(i?i:t)},c,c.exports,t,e,i,s)}return i[n].exports}for(var o="function"==typeof require&&require,n=0;ne&&(e+=360),s=(r+l)/2,i=l==r?0:.5>=s?h/(l+r):h/(2-l-r),[e,100*i,100*s]}function a(t){var e,i,s,a=t[0],o=t[1],n=t[2],r=Math.min(a,o,n),l=Math.max(a,o,n),h=l-r;return i=0==l?0:h/l*1e3/10,l==r?e=0:a==l?e=(o-n)/h:o==l?e=2+(n-a)/h:n==l&&(e=4+(a-o)/h),e=Math.min(60*e,360),0>e&&(e+=360),s=l/255*1e3/10,[e,i,s]}function o(t){var e=t[0],i=t[1],a=t[2],o=s(t)[0],n=1/255*Math.min(e,Math.min(i,a)),a=1-1/255*Math.max(e,Math.max(i,a));return[o,100*n,100*a]}function n(t){var e,i,s,a,o=t[0]/255,n=t[1]/255,r=t[2]/255;return a=Math.min(1-o,1-n,1-r),e=(1-o-a)/(1-a)||0,i=(1-n-a)/(1-a)||0,s=(1-r-a)/(1-a)||0,[100*e,100*i,100*s,100*a]}function l(t){return X[JSON.stringify(t)]}function h(t){var e=t[0]/255,i=t[1]/255,s=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,s=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92;var a=.4124*e+.3576*i+.1805*s,o=.2126*e+.7152*i+.0722*s,n=.0193*e+.1192*i+.9505*s;return[100*a,100*o,100*n]}function c(t){var e,i,s,a=h(t),o=a[0],n=a[1],r=a[2];return o/=95.047,n/=100,r/=108.883,o=o>.008856?Math.pow(o,1/3):7.787*o+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,e=116*n-16,i=500*(o-n),s=200*(n-r),[e,i,s]}function u(t){return z(c(t))}function d(t){var e,i,s,a,o,n=t[0]/360,r=t[1]/100,l=t[2]/100;if(0==r)return o=255*l,[o,o,o];i=.5>l?l*(1+r):l+r-l*r,e=2*l-i,a=[0,0,0];for(var h=0;3>h;h++)s=n+1/3*-(h-1),0>s&&s++,s>1&&s--,o=1>6*s?e+6*(i-e)*s:1>2*s?i:2>3*s?e+(i-e)*(2/3-s)*6:e,a[h]=255*o;return a}function f(t){var e,i,s=t[0],a=t[1]/100,o=t[2]/100;return 0===o?[0,0,0]:(o*=2,a*=1>=o?o:2-o,i=(o+a)/2,e=2*a/(o+a),[s,100*e,100*i])}function m(t){return o(d(t))}function p(t){return n(d(t))}function v(t){return l(d(t))}function x(t){var e=t[0]/60,i=t[1]/100,s=t[2]/100,a=Math.floor(e)%6,o=e-Math.floor(e),n=255*s*(1-i),r=255*s*(1-i*o),l=255*s*(1-i*(1-o)),s=255*s;switch(a){case 0:return[s,l,n];case 1:return[r,s,n];case 2:return[n,s,l];case 3:return[n,r,s];case 4:return[l,n,s];case 5:return[s,n,r]}}function y(t){var e,i,s=t[0],a=t[1]/100,o=t[2]/100;return i=(2-a)*o,e=a*o,e/=1>=i?i:2-i,e=e||0,i/=2,[s,100*e,100*i]}function _(t){return o(x(t))}function k(t){return n(x(t))}function D(t){return l(x(t))}function S(t){var e,i,s,a,o=t[0]/360,n=t[1]/100,l=t[2]/100,h=n+l;switch(h>1&&(n/=h,l/=h),e=Math.floor(6*o),i=1-l,s=6*o-e,0!=(1&e)&&(s=1-s),a=n+s*(i-n),e){default:case 6:case 0:r=i,g=a,b=n;break;case 1:r=a,g=i,b=n;break;case 2:r=n,g=i,b=a;break;case 3:r=n,g=a,b=i;break;case 4:r=a,g=n,b=i;break;case 5:r=i,g=n,b=a}return[255*r,255*g,255*b]}function w(t){return s(S(t))}function C(t){return a(S(t))}function M(t){return n(S(t))}function A(t){return l(S(t))}function T(t){var e,i,s,a=t[0]/100,o=t[1]/100,n=t[2]/100,r=t[3]/100;return e=1-Math.min(1,a*(1-r)+r),i=1-Math.min(1,o*(1-r)+r),s=1-Math.min(1,n*(1-r)+r),[255*e,255*i,255*s]}function I(t){return s(T(t))}function F(t){return a(T(t))}function P(t){return o(T(t))}function O(t){return l(T(t))}function V(t){var e,i,s,a=t[0]/100,o=t[1]/100,n=t[2]/100;return e=3.2406*a+-1.5372*o+n*-.4986,i=a*-.9689+1.8758*o+.0415*n,s=.0557*a+o*-.204+1.057*n,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,s=s>.0031308?1.055*Math.pow(s,1/2.4)-.055:s=12.92*s,e=Math.min(Math.max(0,e),1),i=Math.min(Math.max(0,i),1),s=Math.min(Math.max(0,s),1),[255*e,255*i,255*s]}function W(t){var e,i,s,a=t[0],o=t[1],n=t[2];return a/=95.047,o/=100,n/=108.883,a=a>.008856?Math.pow(a,1/3):7.787*a+16/116,o=o>.008856?Math.pow(o,1/3):7.787*o+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,e=116*o-16,i=500*(a-o),s=200*(o-n),[e,i,s]}function R(t){return z(W(t))}function L(t){var e,i,s,a,o=t[0],n=t[1],r=t[2];return 8>=o?(i=100*o/903.3,a=7.787*(i/100)+16/116):(i=100*Math.pow((o+16)/116,3),a=Math.pow(i/100,1/3)),e=.008856>=e/95.047?e=95.047*(n/500+a-16/116)/7.787:95.047*Math.pow(n/500+a,3),s=.008859>=s/108.883?s=108.883*(a-r/200-16/116)/7.787:108.883*Math.pow(a-r/200,3),[e,i,s]}function z(t){var e,i,s,a=t[0],o=t[1],n=t[2];return e=Math.atan2(n,o),i=360*e/2/Math.PI,0>i&&(i+=360),s=Math.sqrt(o*o+n*n),[a,s,i]}function B(t){return V(L(t))}function Y(t){var e,i,s,a=t[0],o=t[1],n=t[2];return s=n/360*2*Math.PI,e=o*Math.cos(s),i=o*Math.sin(s),[a,e,i]}function H(t){return L(Y(t))}function N(t){return B(Y(t))}function E(t){return J[t]}function U(t){return s(E(t))}function j(t){return a(E(t))}function G(t){return o(E(t))}function q(t){return n(E(t))}function Z(t){return c(E(t))}function Q(t){return h(E(t))}e.exports={rgb2hsl:s,rgb2hsv:a,rgb2hwb:o,rgb2cmyk:n,rgb2keyword:l,rgb2xyz:h,rgb2lab:c,rgb2lch:u,hsl2rgb:d,hsl2hsv:f,hsl2hwb:m,hsl2cmyk:p,hsl2keyword:v,hsv2rgb:x,hsv2hsl:y,hsv2hwb:_,hsv2cmyk:k,hsv2keyword:D,hwb2rgb:S,hwb2hsl:w,hwb2hsv:C,hwb2cmyk:M,hwb2keyword:A,cmyk2rgb:T,cmyk2hsl:I,cmyk2hsv:F,cmyk2hwb:P,cmyk2keyword:O,keyword2rgb:E,keyword2hsl:U,keyword2hsv:j,keyword2hwb:G,keyword2cmyk:q,keyword2lab:Z,keyword2xyz:Q,xyz2rgb:V,xyz2lab:W,xyz2lch:R,lab2xyz:L,lab2rgb:B,lab2lch:z,lch2lab:Y,lch2xyz:H,lch2rgb:N};var J={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]},X={};for(var $ in J)X[JSON.stringify(J[$])]=$},{}],2:[function(t,e,i){var s=t("./conversions"),a=function(){return new h};for(var o in s){a[o+"Raw"]=function(t){return function(e){return"number"==typeof e&&(e=Array.prototype.slice.call(arguments)),s[t](e)}}(o);var n=/(\w+)2(\w+)/.exec(o),r=n[1],l=n[2];a[r]=a[r]||{},a[r][l]=a[o]=function(t){return function(e){"number"==typeof e&&(e=Array.prototype.slice.call(arguments));var i=s[t](e);if("string"==typeof i||void 0===i)return i;for(var a=0;ae||t[3]&&t[3]<1?u(t,e):"rgb("+t[0]+", "+t[1]+", "+t[2]+")"}function u(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+e+")"}function d(t,e){if(1>e||t[3]&&t[3]<1)return f(t,e);var i=Math.round(t[0]/255*100),s=Math.round(t[1]/255*100),a=Math.round(t[2]/255*100);return"rgb("+i+"%, "+s+"%, "+a+"%)"}function f(t,e){var i=Math.round(t[0]/255*100),s=Math.round(t[1]/255*100),a=Math.round(t[2]/255*100);return"rgba("+i+"%, "+s+"%, "+a+"%, "+(e||t[3]||1)+")"}function m(t,e){return 1>e||t[3]&&t[3]<1?g(t,e):"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"}function g(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+e+")"}function p(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 b(t){return _[t.slice(0,3)]}function v(t,e,i){return Math.min(Math.max(e,t),i)}function x(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}var y=t("color-name");e.exports={getRgba:s,getHsla:a,getRgb:n,getHsl:r,getHwb:o,getAlpha:l,hexString:h,rgbString:c,rgbaString:u,percentString:d,percentaString:f,hslString:m,hslaString:g,hwbString:p,keyword:b};var _={};for(var k in y)_[y[k]]=k},{"color-name":5}],4:[function(t,e,i){var s=t("color-convert"),a=t("color-string"),o=function(t){if(t instanceof o)return t;if(!(this instanceof o))return new o(t);if(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},"string"==typeof t){var e=a.getRgba(t);if(e)this.setValues("rgb",e);else if(e=a.getHsla(t))this.setValues("hsl",e);else{if(!(e=a.getHwb(t)))throw new Error('Unable to parse color from string "'+t+'"');this.setValues("hwb",e)}}else if("object"==typeof t){var e=t;if(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)}}};o.prototype={rgb:function(t){return this.setSpace("rgb",arguments)},hsl:function(t){return this.setSpace("hsl",arguments)},hsv:function(t){return this.setSpace("hsv",arguments)},hwb:function(t){return this.setSpace("hwb",arguments)},cmyk:function(t){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(){return 1!==this.values.alpha?this.values.hwb.concat([this.values.alpha]):this.values.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var t=this.values.rgb;return t.concat([this.values.alpha])},hslaArray:function(){var t=this.values.hsl;return t.concat([this.values.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 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 a.hexString(this.values.rgb)},rgbString:function(){return a.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return a.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return a.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return a.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return a.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return a.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return a.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){return this.values.rgb[0]<<16|this.values.rgb[1]<<8|this.values.rgb[2]},luminosity:function(){for(var t=this.values.rgb,e=[],i=0;i=s?s/12.92:Math.pow((s+.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 128>e},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;3>e;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){return this.values.hsl[2]+=this.values.hsl[2]*t,this.setValues("hsl",this.values.hsl),this},darken:function(t){return this.values.hsl[2]-=this.values.hsl[2]*t,this.setValues("hsl",this.values.hsl),this},saturate:function(t){return this.values.hsl[1]+=this.values.hsl[1]*t,this.setValues("hsl",this.values.hsl),this},desaturate:function(t){return this.values.hsl[1]-=this.values.hsl[1]*t,this.setValues("hsl",this.values.hsl),this},whiten:function(t){return this.values.hwb[1]+=this.values.hwb[1]*t,this.setValues("hwb",this.values.hwb),this},blacken:function(t){return this.values.hwb[2]+=this.values.hwb[2]*t,this.setValues("hwb",this.values.hwb),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){return this.setValues("alpha",this.values.alpha-this.values.alpha*t),this},opaquer:function(t){return this.setValues("alpha",this.values.alpha+this.values.alpha*t),this},rotate:function(t){var e=this.values.hsl[0];return e=(e+t)%360,e=0>e?360+e:e,this.values.hsl[0]=e,this.setValues("hsl",this.values.hsl),this},mix:function(t,e){e=1-(null==e?.5:e);for(var i=2*e-1,s=this.alpha()-t.alpha(),a=((i*s==-1?i:(i+s)/(1+i*s))+1)/2,o=1-a,n=this.rgbArray(),r=t.rgbArray(),l=0;l0)for(i in Ji)s=Ji[i],a=e[s],m(a)||(t[s]=a);return t}function p(t){g(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),Xi===!1&&(Xi=!0,i.updateOffset(this),Xi=!1)}function b(t){return t instanceof p||null!=t&&null!=t._isAMomentObject}function v(t){return 0>t?Math.ceil(t):Math.floor(t)}function x(t){var e=+t,i=0;return 0!==e&&isFinite(e)&&(i=v(e)),i}function y(t,e,i){var s,a=Math.min(t.length,e.length),o=Math.abs(t.length-e.length),n=0;for(s=0;a>s;s++)(i&&t[s]!==e[s]||!i&&x(t[s])!==x(e[s]))&&n++;return n+o}function _(){}function k(t){return t?t.toLowerCase().replace("_","-"):t}function D(t){for(var e,i,s,a,o=0;o0;){if(s=S(a.slice(0,e).join("-")))return s;if(i&&i.length>=e&&y(a,i,!0)>=e-1)break;e--}o++}return null}function S(i){var s=null;if(!$i[i]&&"undefined"!=typeof e&&e&&e.exports)try{s=Qi._abbr,t("./locale/"+i),w(s)}catch(a){}return $i[i]}function w(t,e){var i;return t&&(i=m(e)?M(t):C(t,e),i&&(Qi=i)),Qi._abbr}function C(t,e){return null!==e?(e.abbr=t,$i[t]=$i[t]||new _,$i[t].set(e),w(t),$i[t]):(delete $i[t],null)}function M(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Qi;if(!a(t)){if(e=S(t))return e;t=[t]}return D(t)}function A(t,e){var i=t.toLowerCase();Ki[i]=Ki[i+"s"]=Ki[e]=t}function T(t){return"string"==typeof t?Ki[t]||Ki[t.toLowerCase()]:void 0}function I(t){var e,i,s={};for(i in t)r(t,i)&&(e=T(i),e&&(s[e]=t[i]));return s}function F(t){return t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function P(t,e){return function(s){return null!=s?(V(this,t,s),i.updateOffset(this,e),this):O(this,t)}}function O(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function V(t,e,i){t.isValid()&&t._d["set"+(t._isUTC?"UTC":"")+e](i)}function W(t,e){var i;if("object"==typeof t)for(i in t)this.set(i,t[i]);else if(t=T(t),F(this[t]))return this[t](e);return this}function R(t,e,i){var s=""+Math.abs(t),a=e-s.length,o=t>=0;return(o?i?"+":"":"-")+Math.pow(10,Math.max(0,a)).toString().substr(1)+s}function L(t,e,i,s){var a=s;"string"==typeof s&&(a=function(){return this[s]()}),t&&(ss[t]=a),e&&(ss[e[0]]=function(){return R(a.apply(this,arguments),e[1],e[2])}),i&&(ss[i]=function(){return this.localeData().ordinal(a.apply(this,arguments),t)})}function z(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function B(t){var e,i,s=t.match(ts);for(e=0,i=s.length;i>e;e++)ss[s[e]]?s[e]=ss[s[e]]:s[e]=z(s[e]);return function(a){var o="";for(e=0;i>e;e++)o+=s[e]instanceof Function?s[e].call(a,t):s[e];return o}}function Y(t,e){return t.isValid()?(e=H(e,t.localeData()),is[e]=is[e]||B(e),is[e](t)):t.localeData().invalidDate()}function H(t,e){function i(t){return e.longDateFormat(t)||t}var s=5;for(es.lastIndex=0;s>=0&&es.test(t);)t=t.replace(es,i),es.lastIndex=0,s-=1;return t}function N(t,e,i){_s[t]=F(e)?e:function(t,s){return t&&i?i:e}}function E(t,e){return r(_s,t)?_s[t](e._strict,e._locale):new RegExp(U(t))}function U(t){return j(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,i,s,a){return e||i||s||a}))}function j(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function G(t,e){var i,s=e;for("string"==typeof t&&(t=[t]),"number"==typeof e&&(s=function(t,i){i[e]=x(t)}),i=0;is;s++){if(a=h([2e3,s]),i&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp("^"+this.months(a,"").replace(".","")+"$","i"),this._shortMonthsParse[s]=new RegExp("^"+this.monthsShort(a,"").replace(".","")+"$","i")),i||this._monthsParse[s]||(o="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[s]=new RegExp(o.replace(".",""),"i")),i&&"MMMM"===e&&this._longMonthsParse[s].test(t))return s;if(i&&"MMM"===e&&this._shortMonthsParse[s].test(t))return s;if(!i&&this._monthsParse[s].test(t))return s}}function K(t,e){var i;return t.isValid()?"string"==typeof e&&(e=t.localeData().monthsParse(e),"number"!=typeof e)?t:(i=Math.min(t.date(),Q(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,i),t):t}function tt(t){return null!=t?(K(this,t),i.updateOffset(this,!0),this):O(this,"Month")}function et(){return Q(this.year(),this.month())}function it(t){return this._monthsParseExact?(r(this,"_monthsRegex")||at.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex}function st(t){return this._monthsParseExact?(r(this,"_monthsRegex")||at.call(this),t?this._monthsStrictRegex:this._monthsRegex):this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex}function at(){function t(t,e){return e.length-t.length}var e,i,s=[],a=[],o=[];for(e=0;12>e;e++)i=h([2e3,e]),s.push(this.monthsShort(i,"")),a.push(this.months(i,"")),o.push(this.months(i,"")),o.push(this.monthsShort(i,""));for(s.sort(t),a.sort(t),o.sort(t),e=0;12>e;e++)s[e]=j(s[e]),a[e]=j(a[e]),o[e]=j(o[e]);this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")$","i"),this._monthsShortStrictRegex=new RegExp("^("+s.join("|")+")$","i")}function ot(t){var e,i=t._a;return i&&-2===u(t).overflow&&(e=i[Ss]<0||i[Ss]>11?Ss:i[ws]<1||i[ws]>Q(i[Ds],i[Ss])?ws:i[Cs]<0||i[Cs]>24||24===i[Cs]&&(0!==i[Ms]||0!==i[As]||0!==i[Ts])?Cs:i[Ms]<0||i[Ms]>59?Ms:i[As]<0||i[As]>59?As:i[Ts]<0||i[Ts]>999?Ts:-1,u(t)._overflowDayOfYear&&(Ds>e||e>ws)&&(e=ws),u(t)._overflowWeeks&&-1===e&&(e=Is),u(t)._overflowWeekday&&-1===e&&(e=Fs),u(t).overflow=e),t}function nt(t){i.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function rt(t,e){var i=!0;return l(function(){return i&&(nt(t+"\nArguments: "+Array.prototype.slice.call(arguments).join(", ")+"\n"+(new Error).stack),i=!1),e.apply(this,arguments)},e)}function lt(t,e){Ls[t]||(nt(e),Ls[t]=!0)}function ht(t){var e,i,s,a,o,n,r=t._i,l=zs.exec(r)||Bs.exec(r);if(l){for(u(t).iso=!0,e=0,i=Hs.length;i>e;e++)if(Hs[e][1].exec(l[1])){a=Hs[e][0],s=Hs[e][2]!==!1;break}if(null==a)return void(t._isValid=!1);if(l[3]){for(e=0,i=Ns.length;i>e;e++)if(Ns[e][1].exec(l[3])){o=(l[2]||" ")+Ns[e][0];break}if(null==o)return void(t._isValid=!1)}if(!s&&null!=o)return void(t._isValid=!1);if(l[4]){if(!Ys.exec(l[4]))return void(t._isValid=!1);n="Z"}t._f=a+(o||"")+(n||""),St(t)}else t._isValid=!1}function ct(t){ -var e=Es.exec(t._i);return null!==e?void(t._d=new Date(+e[1])):(ht(t),void(t._isValid===!1&&(delete t._isValid,i.createFromInputFallback(t))))}function ut(t,e,i,s,a,o,n){var r=new Date(t,e,i,s,a,o,n);return 100>t&&t>=0&&isFinite(r.getFullYear())&&r.setFullYear(t),r}function dt(t){var e=new Date(Date.UTC.apply(null,arguments));return 100>t&&t>=0&&isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t),e}function ft(t){return mt(t)?366:365}function mt(t){return t%4===0&&t%100!==0||t%400===0}function gt(){return mt(this.year())}function pt(t,e,i){var s=7+e-i,a=(7+dt(t,0,s).getUTCDay()-e)%7;return-a+s-1}function bt(t,e,i,s,a){var o,n,r=(7+i-s)%7,l=pt(t,s,a),h=1+7*(e-1)+r+l;return 0>=h?(o=t-1,n=ft(o)+h):h>ft(t)?(o=t+1,n=h-ft(t)):(o=t,n=h),{year:o,dayOfYear:n}}function vt(t,e,i){var s,a,o=pt(t.year(),e,i),n=Math.floor((t.dayOfYear()-o-1)/7)+1;return 1>n?(a=t.year()-1,s=n+xt(a,e,i)):n>xt(t.year(),e,i)?(s=n-xt(t.year(),e,i),a=t.year()+1):(a=t.year(),s=n),{week:s,year:a}}function xt(t,e,i){var s=pt(t,e,i),a=pt(t+1,e,i);return(ft(t)-s+a)/7}function yt(t,e,i){return null!=t?t:null!=e?e:i}function _t(t){var e=new Date(i.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function kt(t){var e,i,s,a,o=[];if(!t._d){for(s=_t(t),t._w&&null==t._a[ws]&&null==t._a[Ss]&&Dt(t),t._dayOfYear&&(a=yt(t._a[Ds],s[Ds]),t._dayOfYear>ft(a)&&(u(t)._overflowDayOfYear=!0),i=dt(a,0,t._dayOfYear),t._a[Ss]=i.getUTCMonth(),t._a[ws]=i.getUTCDate()),e=0;3>e&&null==t._a[e];++e)t._a[e]=o[e]=s[e];for(;7>e;e++)t._a[e]=o[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[Cs]&&0===t._a[Ms]&&0===t._a[As]&&0===t._a[Ts]&&(t._nextDay=!0,t._a[Cs]=0),t._d=(t._useUTC?dt:ut).apply(null,o),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[Cs]=24)}}function Dt(t){var e,i,s,a,o,n,r,l;e=t._w,null!=e.GG||null!=e.W||null!=e.E?(o=1,n=4,i=yt(e.GG,t._a[Ds],vt(Pt(),1,4).year),s=yt(e.W,1),a=yt(e.E,1),(1>a||a>7)&&(l=!0)):(o=t._locale._week.dow,n=t._locale._week.doy,i=yt(e.gg,t._a[Ds],vt(Pt(),o,n).year),s=yt(e.w,1),null!=e.d?(a=e.d,(0>a||a>6)&&(l=!0)):null!=e.e?(a=e.e+o,(e.e<0||e.e>6)&&(l=!0)):a=o),1>s||s>xt(i,o,n)?u(t)._overflowWeeks=!0:null!=l?u(t)._overflowWeekday=!0:(r=bt(i,s,a,o,n),t._a[Ds]=r.year,t._dayOfYear=r.dayOfYear)}function St(t){if(t._f===i.ISO_8601)return void ht(t);t._a=[],u(t).empty=!0;var e,s,a,o,n,r=""+t._i,l=r.length,h=0;for(a=H(t._f,t._locale).match(ts)||[],e=0;e0&&u(t).unusedInput.push(n),r=r.slice(r.indexOf(s)+s.length),h+=s.length),ss[o]?(s?u(t).empty=!1:u(t).unusedTokens.push(o),Z(o,s,t)):t._strict&&!s&&u(t).unusedTokens.push(o);u(t).charsLeftOver=l-h,r.length>0&&u(t).unusedInput.push(r),u(t).bigHour===!0&&t._a[Cs]<=12&&t._a[Cs]>0&&(u(t).bigHour=void 0),t._a[Cs]=wt(t._locale,t._a[Cs],t._meridiem),kt(t),ot(t)}function wt(t,e,i){var s;return null==i?e:null!=t.meridiemHour?t.meridiemHour(e,i):null!=t.isPM?(s=t.isPM(i),s&&12>e&&(e+=12),s||12!==e||(e=0),e):e}function Ct(t){var e,i,s,a,o;if(0===t._f.length)return u(t).invalidFormat=!0,void(t._d=new Date(NaN));for(a=0;ao)&&(s=o,i=e));l(t,i||e)}function Mt(t){if(!t._d){var e=I(t._i);t._a=n([e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],function(t){return t&&parseInt(t,10)}),kt(t)}}function At(t){var e=new p(ot(Tt(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function Tt(t){var e=t._i,i=t._f;return t._locale=t._locale||M(t._l),null===e||void 0===i&&""===e?f({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),b(e)?new p(ot(e)):(a(i)?Ct(t):i?St(t):o(e)?t._d=e:It(t),d(t)||(t._d=null),t))}function It(t){var e=t._i;void 0===e?t._d=new Date(i.now()):o(e)?t._d=new Date(+e):"string"==typeof e?ct(t):a(e)?(t._a=n(e.slice(0),function(t){return parseInt(t,10)}),kt(t)):"object"==typeof e?Mt(t):"number"==typeof e?t._d=new Date(e):i.createFromInputFallback(t)}function Ft(t,e,i,s,a){var o={};return"boolean"==typeof i&&(s=i,i=void 0),o._isAMomentObject=!0,o._useUTC=o._isUTC=a,o._l=i,o._i=t,o._f=e,o._strict=s,At(o)}function Pt(t,e,i,s){return Ft(t,e,i,s,!1)}function Ot(t,e){var i,s;if(1===e.length&&a(e[0])&&(e=e[0]),!e.length)return Pt();for(i=e[0],s=1;st&&(t=-t,i="-"),i+R(~~(t/60),2)+e+R(~~t%60,2)})}function Bt(t,e){var i=(e||"").match(t)||[],s=i[i.length-1]||[],a=(s+"").match(Zs)||["-",0,0],o=+(60*a[1])+x(a[2]);return"+"===a[0]?o:-o}function Yt(t,e){var s,a;return e._isUTC?(s=e.clone(),a=(b(t)||o(t)?+t:+Pt(t))-+s,s._d.setTime(+s._d+a),i.updateOffset(s,!1),s):Pt(t).local()}function Ht(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function Nt(t,e){var s,a=this._offset||0;return this.isValid()?null!=t?("string"==typeof t?t=Bt(vs,t):Math.abs(t)<16&&(t=60*t),!this._isUTC&&e&&(s=Ht(this)),this._offset=t,this._isUTC=!0,null!=s&&this.add(s,"m"),a!==t&&(!e||this._changeInProgress?ae(this,Kt(t-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?a:Ht(this):null!=t?this:NaN}function Et(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function Ut(t){return this.utcOffset(0,t)}function jt(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Ht(this),"m")),this}function Gt(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(Bt(bs,this._i)),this}function qt(t){return this.isValid()?(t=t?Pt(t).utcOffset():0,(this.utcOffset()-t)%60===0):!1}function Zt(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Qt(){if(!m(this._isDSTShifted))return this._isDSTShifted;var t={};if(g(t,this),t=Tt(t),t._a){var e=t._isUTC?h(t._a):Pt(t._a);this._isDSTShifted=this.isValid()&&y(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Jt(){return this.isValid()?!this._isUTC:!1}function Xt(){return this.isValid()?this._isUTC:!1}function $t(){return this.isValid()?this._isUTC&&0===this._offset:!1}function Kt(t,e){var i,s,a,o=t,n=null;return Lt(t)?o={ms:t._milliseconds,d:t._days,M:t._months}:"number"==typeof t?(o={},e?o[e]=t:o.milliseconds=t):(n=Qs.exec(t))?(i="-"===n[1]?-1:1,o={y:0,d:x(n[ws])*i,h:x(n[Cs])*i,m:x(n[Ms])*i,s:x(n[As])*i,ms:x(n[Ts])*i}):(n=Js.exec(t))?(i="-"===n[1]?-1:1,o={y:te(n[2],i),M:te(n[3],i),d:te(n[4],i),h:te(n[5],i),m:te(n[6],i),s:te(n[7],i),w:te(n[8],i)}):null==o?o={}:"object"==typeof o&&("from"in o||"to"in o)&&(a=ie(Pt(o.from),Pt(o.to)),o={},o.ms=a.milliseconds,o.M=a.months),s=new Rt(o),Lt(t)&&r(t,"_locale")&&(s._locale=t._locale),s}function te(t,e){var i=t&&parseFloat(t.replace(",","."));return(isNaN(i)?0:i)*e}function ee(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 ie(t,e){var i;return t.isValid()&&e.isValid()?(e=Yt(e,t),t.isBefore(e)?i=ee(t,e):(i=ee(e,t),i.milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}function se(t,e){return function(i,s){var a,o;return null===s||isNaN(+s)||(lt(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period)."),o=i,i=s,s=o),i="string"==typeof i?+i:i,a=Kt(i,s),ae(this,a,t),this}}function ae(t,e,s,a){var o=e._milliseconds,n=e._days,r=e._months;t.isValid()&&(a=null==a?!0:a,o&&t._d.setTime(+t._d+o*s),n&&V(t,"Date",O(t,"Date")+n*s),r&&K(t,O(t,"Month")+r*s),a&&i.updateOffset(t,n||r))}function oe(t,e){var i=t||Pt(),s=Yt(i,this).startOf("day"),a=this.diff(s,"days",!0),o=-6>a?"sameElse":-1>a?"lastWeek":0>a?"lastDay":1>a?"sameDay":2>a?"nextDay":7>a?"nextWeek":"sameElse",n=e&&(F(e[o])?e[o]():e[o]);return this.format(n||this.localeData().calendar(o,this,Pt(i)))}function ne(){return new p(this)}function re(t,e){var i=b(t)?t:Pt(t);return this.isValid()&&i.isValid()?(e=T(m(e)?"millisecond":e),"millisecond"===e?+this>+i:+i<+this.clone().startOf(e)):!1}function le(t,e){var i=b(t)?t:Pt(t);return this.isValid()&&i.isValid()?(e=T(m(e)?"millisecond":e),"millisecond"===e?+i>+this:+this.clone().endOf(e)<+i):!1}function he(t,e,i){return this.isAfter(t,i)&&this.isBefore(e,i)}function ce(t,e){var i,s=b(t)?t:Pt(t);return this.isValid()&&s.isValid()?(e=T(e||"millisecond"),"millisecond"===e?+this===+s:(i=+s,+this.clone().startOf(e)<=i&&i<=+this.clone().endOf(e))):!1}function ue(t,e){return this.isSame(t,e)||this.isAfter(t,e)}function de(t,e){return this.isSame(t,e)||this.isBefore(t,e)}function fe(t,e,i){var s,a,o,n;return this.isValid()?(s=Yt(t,this),s.isValid()?(a=6e4*(s.utcOffset()-this.utcOffset()),e=T(e),"year"===e||"month"===e||"quarter"===e?(n=me(this,s),"quarter"===e?n/=3:"year"===e&&(n/=12)):(o=this-s,n="second"===e?o/1e3:"minute"===e?o/6e4:"hour"===e?o/36e5:"day"===e?(o-a)/864e5:"week"===e?(o-a)/6048e5:o),i?n:v(n)):NaN):NaN}function me(t,e){var i,s,a=12*(e.year()-t.year())+(e.month()-t.month()),o=t.clone().add(a,"months");return 0>e-o?(i=t.clone().add(a-1,"months"),s=(e-o)/(o-i)):(i=t.clone().add(a+1,"months"),s=(e-o)/(i-o)),-(a+s)}function ge(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function pe(){var t=this.clone().utc();return 0o&&(e=o),Ne.call(this,t,e,i,s,a))}function Ne(t,e,i,s,a){var o=bt(t,e,i,s,a),n=dt(o.year,0,o.dayOfYear);return this.year(n.getUTCFullYear()),this.month(n.getUTCMonth()),this.date(n.getUTCDate()),this}function Ee(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)}function Ue(t){return vt(t,this._week.dow,this._week.doy).week}function je(){return this._week.dow}function Ge(){return this._week.doy}function qe(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function Ze(t){var e=vt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function Qe(t,e){return"string"!=typeof t?t:isNaN(t)?(t=e.weekdaysParse(t),"number"==typeof t?t:null):parseInt(t,10)}function Je(t,e){return a(this._weekdays)?this._weekdays[t.day()]:this._weekdays[this._weekdays.isFormat.test(e)?"format":"standalone"][t.day()]}function Xe(t){return this._weekdaysShort[t.day()]}function $e(t){return this._weekdaysMin[t.day()]}function Ke(t,e,i){var s,a,o;for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;7>s;s++){if(a=Pt([2e3,1]).day(s),i&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(a,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(a,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(a,"").replace(".",".?")+"$","i")),this._weekdaysParse[s]||(o="^"+this.weekdays(a,"")+"|^"+this.weekdaysShort(a,"")+"|^"+this.weekdaysMin(a,""),this._weekdaysParse[s]=new RegExp(o.replace(".",""),"i")),i&&"dddd"===e&&this._fullWeekdaysParse[s].test(t))return s;if(i&&"ddd"===e&&this._shortWeekdaysParse[s].test(t))return s;if(i&&"dd"===e&&this._minWeekdaysParse[s].test(t))return s;if(!i&&this._weekdaysParse[s].test(t))return s}}function ti(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=Qe(t,this.localeData()),this.add(t-e,"d")):e}function ei(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 ii(t){return this.isValid()?null==t?this.day()||7:this.day(this.day()%7?t:t-7):null!=t?this:NaN}function si(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 ai(){return this.hours()%12||12}function oi(t,e){L(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function ni(t,e){return e._meridiemParse}function ri(t){return"p"===(t+"").toLowerCase().charAt(0)}function li(t,e,i){return t>11?i?"pm":"PM":i?"am":"AM"}function hi(t,e){e[Ts]=x(1e3*("0."+t))}function ci(){return this._isUTC?"UTC":""}function ui(){return this._isUTC?"Coordinated Universal Time":""}function di(t){return Pt(1e3*t)}function fi(){return Pt.apply(null,arguments).parseZone()}function mi(t,e,i){var s=this._calendar[t];return F(s)?s.call(e,i):s}function gi(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 pi(){return this._invalidDate}function bi(t){return this._ordinal.replace("%d",t)}function vi(t){return t}function xi(t,e,i,s){var a=this._relativeTime[i];return F(a)?a(t,e,i,s):a.replace(/%d/i,t)}function yi(t,e){var i=this._relativeTime[t>0?"future":"past"];return F(i)?i(e):i.replace(/%s/i,e)}function _i(t){var e,i;for(i in t)e=t[i],F(e)?this[i]=e:this["_"+i]=e;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function ki(t,e,i,s){var a=M(),o=h().set(s,e);return a[i](o,t)}function Di(t,e,i,s,a){if("number"==typeof t&&(e=t,t=void 0),t=t||"",null!=e)return ki(t,e,i,a);var o,n=[];for(o=0;s>o;o++)n[o]=ki(t,o,i,a);return n}function Si(t,e){return Di(t,e,"months",12,"month")}function wi(t,e){return Di(t,e,"monthsShort",12,"month")}function Ci(t,e){return Di(t,e,"weekdays",7,"day")}function Mi(t,e){return Di(t,e,"weekdaysShort",7,"day")}function Ai(t,e){return Di(t,e,"weekdaysMin",7,"day")}function Ti(){var t=this._data;return this._milliseconds=ya(this._milliseconds),this._days=ya(this._days),this._months=ya(this._months),t.milliseconds=ya(t.milliseconds),t.seconds=ya(t.seconds),t.minutes=ya(t.minutes),t.hours=ya(t.hours),t.months=ya(t.months),t.years=ya(t.years),this}function Ii(t,e,i,s){var a=Kt(e,i);return t._milliseconds+=s*a._milliseconds,t._days+=s*a._days,t._months+=s*a._months,t._bubble()}function Fi(t,e){return Ii(this,t,e,1)}function Pi(t,e){return Ii(this,t,e,-1)}function Oi(t){return 0>t?Math.floor(t):Math.ceil(t)}function Vi(){var t,e,i,s,a,o=this._milliseconds,n=this._days,r=this._months,l=this._data;return o>=0&&n>=0&&r>=0||0>=o&&0>=n&&0>=r||(o+=864e5*Oi(Ri(r)+n),n=0,r=0),l.milliseconds=o%1e3,t=v(o/1e3),l.seconds=t%60,e=v(t/60),l.minutes=e%60,i=v(e/60),l.hours=i%24,n+=v(i/24),a=v(Wi(n)),r+=a,n-=Oi(Ri(a)),s=v(r/12),r%=12,l.days=n,l.months=r,l.years=s,this}function Wi(t){return 4800*t/146097}function Ri(t){return 146097*t/4800}function Li(t){var e,i,s=this._milliseconds;if(t=T(t),"month"===t||"year"===t)return e=this._days+s/864e5,i=this._months+Wi(e),"month"===t?i:i/12;switch(e=this._days+Math.round(Ri(this._months)),t){case"week":return e/7+s/6048e5;case"day":return e+s/864e5;case"hour":return 24*e+s/36e5;case"minute":return 1440*e+s/6e4;case"second":return 86400*e+s/1e3;case"millisecond":return Math.floor(864e5*e)+s;default:throw new Error("Unknown unit "+t)}}function zi(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*x(this._months/12)}function Bi(t){return function(){return this.as(t)}}function Yi(t){return t=T(t),this[t+"s"]()}function Hi(t){return function(){return this._data[t]}}function Ni(){return v(this.days()/7)}function Ei(t,e,i,s,a){return a.relativeTime(e||1,!!i,t,s)}function Ui(t,e,i){var s=Kt(t).abs(),a=Ra(s.as("s")),o=Ra(s.as("m")),n=Ra(s.as("h")),r=Ra(s.as("d")),l=Ra(s.as("M")),h=Ra(s.as("y")),c=a=o&&["m"]||o=n&&["h"]||n=r&&["d"]||r=l&&["M"]||l=h&&["y"]||["yy",h];return c[2]=e,c[3]=+t>0,c[4]=i,Ei.apply(null,c)}function ji(t,e){return void 0===La[t]?!1:void 0===e?La[t]:(La[t]=e,!0)}function Gi(t){var e=this.localeData(),i=Ui(this,!t,e);return t&&(i=e.pastFuture(+this,i)),e.postformat(i)}function qi(){var t,e,i,s=za(this._milliseconds)/1e3,a=za(this._days),o=za(this._months);t=v(s/60),e=v(t/60),s%=60,t%=60,i=v(o/12),o%=12;var n=i,r=o,l=a,h=e,c=t,u=s,d=this.asSeconds();return d?(0>d?"-":"")+"P"+(n?n+"Y":"")+(r?r+"M":"")+(l?l+"D":"")+(h||c||u?"T":"")+(h?h+"H":"")+(c?c+"M":"")+(u?u+"S":""):"P0D"}var Zi,Qi,Ji=i.momentProperties=[],Xi=!1,$i={},Ki={},ts=/(\[[^\[]*\])|(\\)?([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?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,es=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,is={},ss={},as=/\d/,os=/\d\d/,ns=/\d{3}/,rs=/\d{4}/,ls=/[+-]?\d{6}/,hs=/\d\d?/,cs=/\d\d\d\d?/,us=/\d\d\d\d\d\d?/,ds=/\d{1,3}/,fs=/\d{1,4}/,ms=/[+-]?\d{1,6}/,gs=/\d+/,ps=/[+-]?\d+/,bs=/Z|[+-]\d\d:?\d\d/gi,vs=/Z|[+-]\d\d(?::?\d\d)?/gi,xs=/[+-]?\d+(\.\d{1,3})?/,ys=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,_s={},ks={},Ds=0,Ss=1,ws=2,Cs=3,Ms=4,As=5,Ts=6,Is=7,Fs=8;L("M",["MM",2],"Mo",function(){return this.month()+1}),L("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),L("MMMM",0,0,function(t){return this.localeData().months(this,t)}),A("month","M"),N("M",hs),N("MM",hs,os),N("MMM",function(t,e){return e.monthsShortRegex(t)}),N("MMMM",function(t,e){return e.monthsRegex(t)}),G(["M","MM"],function(t,e){e[Ss]=x(t)-1}),G(["MMM","MMMM"],function(t,e,i,s){var a=i._locale.monthsParse(t,s,i._strict);null!=a?e[Ss]=a:u(i).invalidMonth=t});var Ps=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/,Os="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Vs="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Ws=ys,Rs=ys,Ls={};i.suppressDeprecationWarnings=!1;var zs=/^\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)?)?/,Bs=/^\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)?)?/,Ys=/Z|[+-]\d\d(?::?\d\d)?/,Hs=[["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}/]],Ns=[["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/]],Es=/^\/?Date\((\-?\d+)/i;i.createFromInputFallback=rt("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),L("Y",0,0,function(){var t=this.year();return 9999>=t?""+t:"+"+t}),L(0,["YY",2],0,function(){return this.year()%100}),L(0,["YYYY",4],0,"year"),L(0,["YYYYY",5],0,"year"),L(0,["YYYYYY",6,!0],0,"year"),A("year","y"),N("Y",ps),N("YY",hs,os),N("YYYY",fs,rs),N("YYYYY",ms,ls),N("YYYYYY",ms,ls),G(["YYYYY","YYYYYY"],Ds),G("YYYY",function(t,e){e[Ds]=2===t.length?i.parseTwoDigitYear(t):x(t)}),G("YY",function(t,e){e[Ds]=i.parseTwoDigitYear(t)}),G("Y",function(t,e){e[Ds]=parseInt(t,10)}),i.parseTwoDigitYear=function(t){return x(t)+(x(t)>68?1900:2e3)};var Us=P("FullYear",!1);i.ISO_8601=function(){};var js=rt("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var t=Pt.apply(null,arguments);return this.isValid()&&t.isValid()?this>t?this:t:f()}),Gs=rt("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var t=Pt.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:f()}),qs=function(){return Date.now?Date.now():+new Date};zt("Z",":"),zt("ZZ",""),N("Z",vs),N("ZZ",vs),G(["Z","ZZ"],function(t,e,i){i._useUTC=!0,i._tzm=Bt(vs,t)});var Zs=/([\+\-]|\d\d)/gi;i.updateOffset=function(){};var Qs=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?\d*)?$/,Js=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/;Kt.fn=Rt.prototype;var Xs=se(1,"add"),$s=se(-1,"subtract");i.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";var Ks=rt("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)});L(0,["gg",2],0,function(){return this.weekYear()%100}),L(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Re("gggg","weekYear"),Re("ggggg","weekYear"),Re("GGGG","isoWeekYear"),Re("GGGGG","isoWeekYear"),A("weekYear","gg"),A("isoWeekYear","GG"),N("G",ps),N("g",ps),N("GG",hs,os),N("gg",hs,os),N("GGGG",fs,rs),N("gggg",fs,rs),N("GGGGG",ms,ls),N("ggggg",ms,ls),q(["gggg","ggggg","GGGG","GGGGG"],function(t,e,i,s){e[s.substr(0,2)]=x(t)}),q(["gg","GG"],function(t,e,s,a){e[a]=i.parseTwoDigitYear(t)}),L("Q",0,"Qo","quarter"),A("quarter","Q"),N("Q",as),G("Q",function(t,e){e[Ss]=3*(x(t)-1)}),L("w",["ww",2],"wo","week"),L("W",["WW",2],"Wo","isoWeek"),A("week","w"),A("isoWeek","W"),N("w",hs),N("ww",hs,os),N("W",hs),N("WW",hs,os),q(["w","ww","W","WW"],function(t,e,i,s){e[s.substr(0,1)]=x(t)});var ta={dow:0,doy:6};L("D",["DD",2],"Do","date"),A("date","D"),N("D",hs),N("DD",hs,os),N("Do",function(t,e){return t?e._ordinalParse:e._ordinalParseLenient}),G(["D","DD"],ws),G("Do",function(t,e){e[ws]=x(t.match(hs)[0],10)});var ea=P("Date",!0);L("d",0,"do","day"),L("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),L("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),L("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),L("e",0,0,"weekday"),L("E",0,0,"isoWeekday"),A("day","d"),A("weekday","e"),A("isoWeekday","E"),N("d",hs),N("e",hs),N("E",hs),N("dd",ys),N("ddd",ys),N("dddd",ys),q(["dd","ddd","dddd"],function(t,e,i,s){var a=i._locale.weekdaysParse(t,s,i._strict);null!=a?e.d=a:u(i).invalidWeekday=t}),q(["d","e","E"],function(t,e,i,s){e[s]=x(t)});var ia="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),sa="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),aa="Su_Mo_Tu_We_Th_Fr_Sa".split("_");L("DDD",["DDDD",3],"DDDo","dayOfYear"),A("dayOfYear","DDD"),N("DDD",ds),N("DDDD",ns),G(["DDD","DDDD"],function(t,e,i){i._dayOfYear=x(t)}),L("H",["HH",2],0,"hour"),L("h",["hh",2],0,ai),L("hmm",0,0,function(){return""+ai.apply(this)+R(this.minutes(),2)}),L("hmmss",0,0,function(){return""+ai.apply(this)+R(this.minutes(),2)+R(this.seconds(),2)}),L("Hmm",0,0,function(){return""+this.hours()+R(this.minutes(),2)}),L("Hmmss",0,0,function(){return""+this.hours()+R(this.minutes(),2)+R(this.seconds(),2)}),oi("a",!0),oi("A",!1),A("hour","h"),N("a",ni),N("A",ni),N("H",hs),N("h",hs),N("HH",hs,os),N("hh",hs,os),N("hmm",cs),N("hmmss",us),N("Hmm",cs),N("Hmmss",us),G(["H","HH"],Cs),G(["a","A"],function(t,e,i){i._isPm=i._locale.isPM(t),i._meridiem=t}),G(["h","hh"],function(t,e,i){e[Cs]=x(t),u(i).bigHour=!0}),G("hmm",function(t,e,i){var s=t.length-2;e[Cs]=x(t.substr(0,s)),e[Ms]=x(t.substr(s)),u(i).bigHour=!0}),G("hmmss",function(t,e,i){var s=t.length-4,a=t.length-2;e[Cs]=x(t.substr(0,s)),e[Ms]=x(t.substr(s,2)),e[As]=x(t.substr(a)),u(i).bigHour=!0}),G("Hmm",function(t,e,i){var s=t.length-2;e[Cs]=x(t.substr(0,s)),e[Ms]=x(t.substr(s))}),G("Hmmss",function(t,e,i){var s=t.length-4,a=t.length-2;e[Cs]=x(t.substr(0,s)),e[Ms]=x(t.substr(s,2)),e[As]=x(t.substr(a))});var oa=/[ap]\.?m?\.?/i,na=P("Hours",!0);L("m",["mm",2],0,"minute"),A("minute","m"),N("m",hs),N("mm",hs,os),G(["m","mm"],Ms);var ra=P("Minutes",!1);L("s",["ss",2],0,"second"),A("second","s"),N("s",hs),N("ss",hs,os),G(["s","ss"],As);var la=P("Seconds",!1);L("S",0,0,function(){return~~(this.millisecond()/100)}),L(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),L(0,["SSS",3],0,"millisecond"),L(0,["SSSS",4],0,function(){return 10*this.millisecond()}),L(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),L(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),L(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),L(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),L(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),A("millisecond","ms"),N("S",ds,as),N("SS",ds,os),N("SSS",ds,ns);var ha;for(ha="SSSS";ha.length<=9;ha+="S")N(ha,gs);for(ha="S";ha.length<=9;ha+="S")G(ha,hi);var ca=P("Milliseconds",!1);L("z",0,0,"zoneAbbr"),L("zz",0,0,"zoneName");var ua=p.prototype;ua.add=Xs,ua.calendar=oe,ua.clone=ne,ua.diff=fe,ua.endOf=we,ua.format=be,ua.from=ve,ua.fromNow=xe,ua.to=ye,ua.toNow=_e,ua.get=W,ua.invalidAt=Ve,ua.isAfter=re,ua.isBefore=le,ua.isBetween=he,ua.isSame=ce,ua.isSameOrAfter=ue,ua.isSameOrBefore=de,ua.isValid=Pe,ua.lang=Ks,ua.locale=ke,ua.localeData=De,ua.max=Gs,ua.min=js,ua.parsingFlags=Oe,ua.set=W,ua.startOf=Se,ua.subtract=$s,ua.toArray=Te,ua.toObject=Ie,ua.toDate=Ae,ua.toISOString=pe,ua.toJSON=Fe,ua.toString=ge,ua.unix=Me,ua.valueOf=Ce,ua.creationData=We,ua.year=Us,ua.isLeapYear=gt,ua.weekYear=Le,ua.isoWeekYear=ze,ua.quarter=ua.quarters=Ee,ua.month=tt,ua.daysInMonth=et,ua.week=ua.weeks=qe,ua.isoWeek=ua.isoWeeks=Ze,ua.weeksInYear=Ye,ua.isoWeeksInYear=Be,ua.date=ea,ua.day=ua.days=ti,ua.weekday=ei,ua.isoWeekday=ii,ua.dayOfYear=si,ua.hour=ua.hours=na,ua.minute=ua.minutes=ra,ua.second=ua.seconds=la,ua.millisecond=ua.milliseconds=ca,ua.utcOffset=Nt,ua.utc=Ut,ua.local=jt,ua.parseZone=Gt,ua.hasAlignedHourOffset=qt,ua.isDST=Zt,ua.isDSTShifted=Qt,ua.isLocal=Jt,ua.isUtcOffset=Xt,ua.isUtc=$t,ua.isUTC=$t,ua.zoneAbbr=ci,ua.zoneName=ui,ua.dates=rt("dates accessor is deprecated. Use date instead.",ea),ua.months=rt("months accessor is deprecated. Use month instead",tt),ua.years=rt("years accessor is deprecated. Use year instead",Us),ua.zone=rt("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",Et);var da=ua,fa={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},ma={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"},ga="Invalid date",pa="%d",ba=/\d{1,2}/,va={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"},xa=_.prototype;xa._calendar=fa,xa.calendar=mi,xa._longDateFormat=ma,xa.longDateFormat=gi,xa._invalidDate=ga,xa.invalidDate=pi,xa._ordinal=pa,xa.ordinal=bi,xa._ordinalParse=ba,xa.preparse=vi,xa.postformat=vi,xa._relativeTime=va,xa.relativeTime=xi,xa.pastFuture=yi,xa.set=_i,xa.months=J,xa._months=Os,xa.monthsShort=X,xa._monthsShort=Vs,xa.monthsParse=$,xa._monthsRegex=Rs,xa.monthsRegex=st,xa._monthsShortRegex=Ws,xa.monthsShortRegex=it,xa.week=Ue,xa._week=ta,xa.firstDayOfYear=Ge,xa.firstDayOfWeek=je,xa.weekdays=Je,xa._weekdays=ia,xa.weekdaysMin=$e,xa._weekdaysMin=aa,xa.weekdaysShort=Xe,xa._weekdaysShort=sa,xa.weekdaysParse=Ke,xa.isPM=ri,xa._meridiemParse=oa,xa.meridiem=li,w("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,i=1===x(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+i}}),i.lang=rt("moment.lang is deprecated. Use moment.locale instead.",w),i.langData=rt("moment.langData is deprecated. Use moment.localeData instead.",M);var ya=Math.abs,_a=Bi("ms"),ka=Bi("s"),Da=Bi("m"),Sa=Bi("h"),wa=Bi("d"),Ca=Bi("w"),Ma=Bi("M"),Aa=Bi("y"),Ta=Hi("milliseconds"),Ia=Hi("seconds"),Fa=Hi("minutes"),Pa=Hi("hours"),Oa=Hi("days"),Va=Hi("months"),Wa=Hi("years"),Ra=Math.round,La={s:45,m:45,h:22,d:26,M:11},za=Math.abs,Ba=Rt.prototype;Ba.abs=Ti,Ba.add=Fi,Ba.subtract=Pi,Ba.as=Li,Ba.asMilliseconds=_a,Ba.asSeconds=ka,Ba.asMinutes=Da,Ba.asHours=Sa,Ba.asDays=wa,Ba.asWeeks=Ca,Ba.asMonths=Ma,Ba.asYears=Aa,Ba.valueOf=zi,Ba._bubble=Vi,Ba.get=Yi,Ba.milliseconds=Ta,Ba.seconds=Ia,Ba.minutes=Fa,Ba.hours=Pa,Ba.days=Oa,Ba.weeks=Ni,Ba.months=Va,Ba.years=Wa,Ba.humanize=Gi,Ba.toISOString=qi,Ba.toString=qi,Ba.toJSON=qi,Ba.locale=ke,Ba.localeData=De,Ba.toIsoString=rt("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",qi),Ba.lang=Ks,L("X",0,0,"unix"),L("x",0,0,"valueOf"),N("x",ps),N("X",xs),G("X",function(t,e,i){i._d=new Date(1e3*parseFloat(t,10))}),G("x",function(t,e,i){i._d=new Date(x(t))}),i.version="2.11.2",s(Pt),i.fn=da,i.min=Vt,i.max=Wt,i.now=qs,i.utc=h,i.unix=di,i.months=Si,i.isDate=o,i.locale=w,i.invalid=f,i.duration=Kt,i.isMoment=b,i.weekdays=Ci,i.parseZone=fi,i.localeData=M,i.isDuration=Lt,i.monthsShort=wi,i.weekdaysMin=Ai,i.defineLocale=C,i.weekdaysShort=Mi,i.normalizeUnits=T,i.relativeTimeThreshold=ji,i.prototype=da;var Ya=i;return Ya})},{}],7:[function(t,e,i){/*! +!function t(e,i,a){function s(n,r){if(!i[n]){if(!e[n]){var l="function"==typeof require&&require;if(!r&&l)return l(n,!0);if(o)return o(n,!0);var h=new Error("Cannot find module '"+n+"'");throw h.code="MODULE_NOT_FOUND",h}var c=i[n]={exports:{}};e[n][0].call(c.exports,function(t){var i=e[n][1][t];return s(i?i:t)},c,c.exports,t,e,i,a)}return i[n].exports}for(var o="function"==typeof require&&require,n=0;ne&&(e+=360),a=(r+l)/2,i=l==r?0:.5>=a?h/(l+r):h/(2-l-r),[e,100*i,100*a]}function s(t){var e,i,a,s=t[0],o=t[1],n=t[2],r=Math.min(s,o,n),l=Math.max(s,o,n),h=l-r;return i=0==l?0:h/l*1e3/10,l==r?e=0:s==l?e=(o-n)/h:o==l?e=2+(n-s)/h:n==l&&(e=4+(s-o)/h),e=Math.min(60*e,360),0>e&&(e+=360),a=l/255*1e3/10,[e,i,a]}function o(t){var e=t[0],i=t[1],s=t[2],o=a(t)[0],n=1/255*Math.min(e,Math.min(i,s)),s=1-1/255*Math.max(e,Math.max(i,s));return[o,100*n,100*s]}function n(t){var e,i,a,s,o=t[0]/255,n=t[1]/255,r=t[2]/255;return s=Math.min(1-o,1-n,1-r),e=(1-o-s)/(1-s)||0,i=(1-n-s)/(1-s)||0,a=(1-r-s)/(1-s)||0,[100*e,100*i,100*a,100*s]}function l(t){return X[JSON.stringify(t)]}function h(t){var e=t[0]/255,i=t[1]/255,a=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,a=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92;var s=.4124*e+.3576*i+.1805*a,o=.2126*e+.7152*i+.0722*a,n=.0193*e+.1192*i+.9505*a;return[100*s,100*o,100*n]}function c(t){var e,i,a,s=h(t),o=s[0],n=s[1],r=s[2];return o/=95.047,n/=100,r/=108.883,o=o>.008856?Math.pow(o,1/3):7.787*o+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,e=116*n-16,i=500*(o-n),a=200*(n-r),[e,i,a]}function u(t){return z(c(t))}function d(t){var e,i,a,s,o,n=t[0]/360,r=t[1]/100,l=t[2]/100;if(0==r)return o=255*l,[o,o,o];i=.5>l?l*(1+r):l+r-l*r,e=2*l-i,s=[0,0,0];for(var h=0;3>h;h++)a=n+1/3*-(h-1),0>a&&a++,a>1&&a--,o=1>6*a?e+6*(i-e)*a:1>2*a?i:2>3*a?e+(i-e)*(2/3-a)*6:e,s[h]=255*o;return s}function f(t){var e,i,a=t[0],s=t[1]/100,o=t[2]/100;return 0===o?[0,0,0]:(o*=2,s*=1>=o?o:2-o,i=(o+s)/2,e=2*s/(o+s),[a,100*e,100*i])}function m(t){return o(d(t))}function p(t){return n(d(t))}function v(t){return l(d(t))}function x(t){var e=t[0]/60,i=t[1]/100,a=t[2]/100,s=Math.floor(e)%6,o=e-Math.floor(e),n=255*a*(1-i),r=255*a*(1-i*o),l=255*a*(1-i*(1-o)),a=255*a;switch(s){case 0:return[a,l,n];case 1:return[r,a,n];case 2:return[n,a,l];case 3:return[n,r,a];case 4:return[l,n,a];case 5:return[a,n,r]}}function y(t){var e,i,a=t[0],s=t[1]/100,o=t[2]/100;return i=(2-s)*o,e=s*o,e/=1>=i?i:2-i,e=e||0,i/=2,[a,100*e,100*i]}function k(t){return o(x(t))}function _(t){return n(x(t))}function D(t){return l(x(t))}function S(t){var e,i,a,s,o=t[0]/360,n=t[1]/100,l=t[2]/100,h=n+l;switch(h>1&&(n/=h,l/=h),e=Math.floor(6*o),i=1-l,a=6*o-e,0!=(1&e)&&(a=1-a),s=n+a*(i-n),e){default:case 6:case 0:r=i,g=s,b=n;break;case 1:r=s,g=i,b=n;break;case 2:r=n,g=i,b=s;break;case 3:r=n,g=s,b=i;break;case 4:r=s,g=n,b=i;break;case 5:r=i,g=n,b=s}return[255*r,255*g,255*b]}function w(t){return a(S(t))}function C(t){return s(S(t))}function M(t){return n(S(t))}function A(t){return l(S(t))}function I(t){var e,i,a,s=t[0]/100,o=t[1]/100,n=t[2]/100,r=t[3]/100;return e=1-Math.min(1,s*(1-r)+r),i=1-Math.min(1,o*(1-r)+r),a=1-Math.min(1,n*(1-r)+r),[255*e,255*i,255*a]}function T(t){return a(I(t))}function F(t){return s(I(t))}function P(t){return o(I(t))}function O(t){return l(I(t))}function V(t){var e,i,a,s=t[0]/100,o=t[1]/100,n=t[2]/100;return e=3.2406*s+-1.5372*o+n*-.4986,i=s*-.9689+1.8758*o+.0415*n,a=.0557*s+o*-.204+1.057*n,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,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a=12.92*a,e=Math.min(Math.max(0,e),1),i=Math.min(Math.max(0,i),1),a=Math.min(Math.max(0,a),1),[255*e,255*i,255*a]}function W(t){var e,i,a,s=t[0],o=t[1],n=t[2];return s/=95.047,o/=100,n/=108.883,s=s>.008856?Math.pow(s,1/3):7.787*s+16/116,o=o>.008856?Math.pow(o,1/3):7.787*o+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,e=116*o-16,i=500*(s-o),a=200*(o-n),[e,i,a]}function L(t){return z(W(t))}function R(t){var e,i,a,s,o=t[0],n=t[1],r=t[2];return 8>=o?(i=100*o/903.3,s=7.787*(i/100)+16/116):(i=100*Math.pow((o+16)/116,3),s=Math.pow(i/100,1/3)),e=.008856>=e/95.047?e=95.047*(n/500+s-16/116)/7.787:95.047*Math.pow(n/500+s,3),a=.008859>=a/108.883?a=108.883*(s-r/200-16/116)/7.787:108.883*Math.pow(s-r/200,3),[e,i,a]}function z(t){var e,i,a,s=t[0],o=t[1],n=t[2];return e=Math.atan2(n,o),i=360*e/2/Math.PI,0>i&&(i+=360),a=Math.sqrt(o*o+n*n),[s,a,i]}function B(t){return V(R(t))}function Y(t){var e,i,a,s=t[0],o=t[1],n=t[2];return a=n/360*2*Math.PI,e=o*Math.cos(a),i=o*Math.sin(a),[s,e,i]}function N(t){return R(Y(t))}function H(t){return B(Y(t))}function E(t){return J[t]}function U(t){return a(E(t))}function j(t){return s(E(t))}function q(t){return o(E(t))}function G(t){return n(E(t))}function Z(t){return c(E(t))}function Q(t){return h(E(t))}e.exports={rgb2hsl:a,rgb2hsv:s,rgb2hwb:o,rgb2cmyk:n,rgb2keyword:l,rgb2xyz:h,rgb2lab:c,rgb2lch:u,hsl2rgb:d,hsl2hsv:f,hsl2hwb:m,hsl2cmyk:p,hsl2keyword:v,hsv2rgb:x,hsv2hsl:y,hsv2hwb:k,hsv2cmyk:_,hsv2keyword:D,hwb2rgb:S,hwb2hsl:w,hwb2hsv:C,hwb2cmyk:M,hwb2keyword:A,cmyk2rgb:I,cmyk2hsl:T,cmyk2hsv:F,cmyk2hwb:P,cmyk2keyword:O,keyword2rgb:E,keyword2hsl:U,keyword2hsv:j,keyword2hwb:q,keyword2cmyk:G,keyword2lab:Z,keyword2xyz:Q,xyz2rgb:V,xyz2lab:W,xyz2lch:L,lab2xyz:R,lab2rgb:B,lab2lch:z,lch2lab:Y,lch2xyz:N,lch2rgb:H};var J={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]},X={};for(var $ in J)X[JSON.stringify(J[$])]=$},{}],2:[function(t,e,i){var a=t("./conversions"),s=function(){return new h};for(var o in a){s[o+"Raw"]=function(t){return function(e){return"number"==typeof e&&(e=Array.prototype.slice.call(arguments)),a[t](e)}}(o);var n=/(\w+)2(\w+)/.exec(o),r=n[1],l=n[2];s[r]=s[r]||{},s[r][l]=s[o]=function(t){return function(e){"number"==typeof e&&(e=Array.prototype.slice.call(arguments));var i=a[t](e);if("string"==typeof i||void 0===i)return i;for(var s=0;se||t[3]&&t[3]<1?u(t,e):"rgb("+t[0]+", "+t[1]+", "+t[2]+")"}function u(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+e+")"}function d(t,e){if(1>e||t[3]&&t[3]<1)return f(t,e);var i=Math.round(t[0]/255*100),a=Math.round(t[1]/255*100),s=Math.round(t[2]/255*100);return"rgb("+i+"%, "+a+"%, "+s+"%)"}function f(t,e){var i=Math.round(t[0]/255*100),a=Math.round(t[1]/255*100),s=Math.round(t[2]/255*100);return"rgba("+i+"%, "+a+"%, "+s+"%, "+(e||t[3]||1)+")"}function g(t,e){return 1>e||t[3]&&t[3]<1?m(t,e):"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"}function m(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+e+")"}function p(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 b(t){return k[t.slice(0,3)]}function v(t,e,i){return Math.min(Math.max(e,t),i)}function x(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}var y=t("color-name");e.exports={getRgba:a,getHsla:s,getRgb:n,getHsl:r,getHwb:o,getAlpha:l,hexString:h,rgbString:c,rgbaString:u,percentString:d,percentaString:f,hslString:g,hslaString:m,hwbString:p,keyword:b};var k={};for(var _ in y)k[y[_]]=_},{"color-name":4}],4:[function(t,e,i){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]}},{}],5:[function(t,e,i){var a=t("color-convert"),s=t("color-string"),o=function(t){if(t instanceof o)return t;if(!(this instanceof o))return new o(t);if(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},"string"==typeof t){var e=s.getRgba(t);if(e)this.setValues("rgb",e);else if(e=s.getHsla(t))this.setValues("hsl",e);else{if(!(e=s.getHwb(t)))throw new Error('Unable to parse color from string "'+t+'"');this.setValues("hwb",e)}}else if("object"==typeof t){var e=t;if(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)}}};o.prototype={rgb:function(t){return this.setSpace("rgb",arguments)},hsl:function(t){return this.setSpace("hsl",arguments)},hsv:function(t){return this.setSpace("hsv",arguments)},hwb:function(t){return this.setSpace("hwb",arguments)},cmyk:function(t){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(){return 1!==this.values.alpha?this.values.hwb.concat([this.values.alpha]):this.values.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var t=this.values.rgb;return t.concat([this.values.alpha])},hslaArray:function(){var t=this.values.hsl;return t.concat([this.values.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 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 s.hexString(this.values.rgb)},rgbString:function(){return s.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return s.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return s.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return s.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return s.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return s.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return s.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){return this.values.rgb[0]<<16|this.values.rgb[1]<<8|this.values.rgb[2]},luminosity:function(){for(var t=this.values.rgb,e=[],i=0;i=a?a/12.92:Math.pow((a+.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 128>e},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;3>e;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){return this.values.hsl[2]+=this.values.hsl[2]*t,this.setValues("hsl",this.values.hsl),this},darken:function(t){return this.values.hsl[2]-=this.values.hsl[2]*t,this.setValues("hsl",this.values.hsl),this},saturate:function(t){return this.values.hsl[1]+=this.values.hsl[1]*t,this.setValues("hsl",this.values.hsl),this},desaturate:function(t){return this.values.hsl[1]-=this.values.hsl[1]*t,this.setValues("hsl",this.values.hsl),this},whiten:function(t){return this.values.hwb[1]+=this.values.hwb[1]*t,this.setValues("hwb",this.values.hwb),this},blacken:function(t){return this.values.hwb[2]+=this.values.hwb[2]*t,this.setValues("hwb",this.values.hwb),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){return this.setValues("alpha",this.values.alpha-this.values.alpha*t),this},opaquer:function(t){return this.setValues("alpha",this.values.alpha+this.values.alpha*t),this},rotate:function(t){var e=this.values.hsl[0];return e=(e+t)%360,e=0>e?360+e:e,this.values.hsl[0]=e,this.setValues("hsl",this.values.hsl),this},mix:function(t,e){e=1-(null==e?.5:e);for(var i=2*e-1,a=this.alpha()-t.alpha(),s=((i*a==-1?i:(i+a)/(1+i*a))+1)/2,o=1-s,n=this.rgbArray(),r=t.rgbArray(),l=0;l0)for(i in Ri)a=Ri[i],s=e[a],"undefined"!=typeof s&&(t[a]=s);return t}function m(t){g(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),zi===!1&&(zi=!0,i.updateOffset(this),zi=!1)}function p(t){return t instanceof m||null!=t&&null!=t._isAMomentObject}function b(t){return 0>t?Math.ceil(t):Math.floor(t)}function v(t){var e=+t,i=0;return 0!==e&&isFinite(e)&&(i=b(e)),i}function x(t,e,i){var a,s=Math.min(t.length,e.length),o=Math.abs(t.length-e.length),n=0;for(a=0;s>a;a++)(i&&t[a]!==e[a]||!i&&v(t[a])!==v(e[a]))&&n++;return n+o}function y(){}function k(t){return t?t.toLowerCase().replace("_","-"):t}function _(t){for(var e,i,a,s,o=0;o0;){if(a=D(s.slice(0,e).join("-")))return a;if(i&&i.length>=e&&x(s,i,!0)>=e-1)break;e--}o++}return null}function D(i){var a=null;if(!Bi[i]&&"undefined"!=typeof e&&e&&e.exports)try{a=Li._abbr,t("./locale/"+i),S(a)}catch(s){}return Bi[i]}function S(t,e){var i;return t&&(i="undefined"==typeof e?C(t):w(t,e),i&&(Li=i)),Li._abbr}function w(t,e){return null!==e?(e.abbr=t,Bi[t]=Bi[t]||new y,Bi[t].set(e),S(t),Bi[t]):(delete Bi[t],null)}function C(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Li;if(!s(t)){if(e=D(t))return e;t=[t]}return _(t)}function M(t,e){var i=t.toLowerCase();Yi[i]=Yi[i+"s"]=Yi[e]=t}function A(t){return"string"==typeof t?Yi[t]||Yi[t.toLowerCase()]:void 0}function I(t){var e,i,a={};for(i in t)r(t,i)&&(e=A(i),e&&(a[e]=t[i]));return a}function T(t,e){return function(a){return null!=a?(P(this,t,a),i.updateOffset(this,e),this):F(this,t)}}function F(t,e){return t._d["get"+(t._isUTC?"UTC":"")+e]()}function P(t,e,i){return t._d["set"+(t._isUTC?"UTC":"")+e](i)}function O(t,e){var i;if("object"==typeof t)for(i in t)this.set(i,t[i]);else if(t=A(t),"function"==typeof this[t])return this[t](e);return this}function V(t,e,i){var a=""+Math.abs(t),s=e-a.length,o=t>=0;return(o?i?"+":"":"-")+Math.pow(10,Math.max(0,s)).toString().substr(1)+a}function W(t,e,i,a){var s=a;"string"==typeof a&&(s=function(){return this[a]()}),t&&(Ui[t]=s),e&&(Ui[e[0]]=function(){return V(s.apply(this,arguments),e[1],e[2])}),i&&(Ui[i]=function(){return this.localeData().ordinal(s.apply(this,arguments),t)})}function L(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function R(t){var e,i,a=t.match(Ni);for(e=0,i=a.length;i>e;e++)Ui[a[e]]?a[e]=Ui[a[e]]:a[e]=L(a[e]);return function(s){var o="";for(e=0;i>e;e++)o+=a[e]instanceof Function?a[e].call(s,t):a[e];return o}}function z(t,e){return t.isValid()?(e=B(e,t.localeData()),Ei[e]=Ei[e]||R(e),Ei[e](t)):t.localeData().invalidDate()}function B(t,e){function i(t){return e.longDateFormat(t)||t}var a=5;for(Hi.lastIndex=0;a>=0&&Hi.test(t);)t=t.replace(Hi,i),Hi.lastIndex=0,a-=1;return t}function Y(t){return"function"==typeof t&&"[object Function]"===Object.prototype.toString.call(t)}function N(t,e,i){oa[t]=Y(e)?e:function(t){return t&&i?i:e}}function H(t,e){return r(oa,t)?oa[t](e._strict,e._locale):new RegExp(E(t))}function E(t){return t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,i,a,s){return e||i||a||s}).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function U(t,e){var i,a=e;for("string"==typeof t&&(t=[t]),"number"==typeof e&&(a=function(t,i){i[e]=v(t)}),i=0;ia;a++){if(s=h([2e3,a]),i&&!this._longMonthsParse[a]&&(this._longMonthsParse[a]=new RegExp("^"+this.months(s,"").replace(".","")+"$","i"),this._shortMonthsParse[a]=new RegExp("^"+this.monthsShort(s,"").replace(".","")+"$","i")),i||this._monthsParse[a]||(o="^"+this.months(s,"")+"|^"+this.monthsShort(s,""),this._monthsParse[a]=new RegExp(o.replace(".",""),"i")),i&&"MMMM"===e&&this._longMonthsParse[a].test(t))return a;if(i&&"MMM"===e&&this._shortMonthsParse[a].test(t))return a;if(!i&&this._monthsParse[a].test(t))return a}}function X(t,e){var i;return"string"==typeof e&&(e=t.localeData().monthsParse(e),"number"!=typeof e)?t:(i=Math.min(t.date(),G(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,i),t)}function $(t){return null!=t?(X(this,t),i.updateOffset(this,!0),this):F(this,"Month")}function K(){return G(this.year(),this.month())}function tt(t){var e,i=t._a;return i&&-2===u(t).overflow&&(e=i[la]<0||i[la]>11?la:i[ha]<1||i[ha]>G(i[ra],i[la])?ha:i[ca]<0||i[ca]>24||24===i[ca]&&(0!==i[ua]||0!==i[da]||0!==i[fa])?ca:i[ua]<0||i[ua]>59?ua:i[da]<0||i[da]>59?da:i[fa]<0||i[fa]>999?fa:-1,u(t)._overflowDayOfYear&&(ra>e||e>ha)&&(e=ha),u(t).overflow=e),t}function et(t){i.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function it(t,e){var i=!0;return l(function(){return i&&(et(t+"\n"+(new Error).stack),i=!1),e.apply(this,arguments)},e)}function at(t,e){pa[t]||(et(e),pa[t]=!0)}function st(t){var e,i,a=t._i,s=ba.exec(a);if(s){for(u(t).iso=!0,e=0,i=va.length;i>e;e++)if(va[e][1].exec(a)){t._f=va[e][0];break}for(e=0,i=xa.length;i>e;e++)if(xa[e][1].exec(a)){t._f+=(s[6]||" ")+xa[e][0];break}a.match(ia)&&(t._f+="Z"),Dt(t)}else t._isValid=!1}function ot(t){var e=ya.exec(t._i);return null!==e?void(t._d=new Date(+e[1])):(st(t),void(t._isValid===!1&&(delete t._isValid,i.createFromInputFallback(t))))}function nt(t,e,i,a,s,o,n){var r=new Date(t,e,i,a,s,o,n);return 1970>t&&r.setFullYear(t),r}function rt(t){var e=new Date(Date.UTC.apply(null,arguments));return 1970>t&&e.setUTCFullYear(t),e}function lt(t){return ht(t)?366:365}function ht(t){return t%4===0&&t%100!==0||t%400===0}function ct(){return ht(this.year())}function ut(t,e,i){var a,s=i-e,o=i-t.day();return o>s&&(o-=7),s-7>o&&(o+=7),a=Ft(t).add(o,"d"),{week:Math.ceil(a.dayOfYear()/7),year:a.year()}}function dt(t){return ut(t,this._week.dow,this._week.doy).week}function ft(){return this._week.dow}function gt(){return this._week.doy}function mt(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function pt(t){var e=ut(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function bt(t,e,i,a,s){var o,n=6+s-a,r=rt(t,0,1+n),l=r.getUTCDay();return s>l&&(l+=7),i=null!=i?1*i:s,o=1+n+7*(e-1)-l+i,{year:o>0?t:t-1,dayOfYear:o>0?o:lt(t-1)+o}}function vt(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 xt(t,e,i){return null!=t?t:null!=e?e:i}function yt(t){var e=new Date;return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function kt(t){var e,i,a,s,o=[];if(!t._d){for(a=yt(t),t._w&&null==t._a[ha]&&null==t._a[la]&&_t(t),t._dayOfYear&&(s=xt(t._a[ra],a[ra]),t._dayOfYear>lt(s)&&(u(t)._overflowDayOfYear=!0),i=rt(s,0,t._dayOfYear),t._a[la]=i.getUTCMonth(),t._a[ha]=i.getUTCDate()),e=0;3>e&&null==t._a[e];++e)t._a[e]=o[e]=a[e];for(;7>e;e++)t._a[e]=o[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[ca]&&0===t._a[ua]&&0===t._a[da]&&0===t._a[fa]&&(t._nextDay=!0,t._a[ca]=0),t._d=(t._useUTC?rt:nt).apply(null,o),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[ca]=24)}}function _t(t){var e,i,a,s,o,n,r;e=t._w,null!=e.GG||null!=e.W||null!=e.E?(o=1,n=4,i=xt(e.GG,t._a[ra],ut(Ft(),1,4).year),a=xt(e.W,1),s=xt(e.E,1)):(o=t._locale._week.dow,n=t._locale._week.doy,i=xt(e.gg,t._a[ra],ut(Ft(),o,n).year),a=xt(e.w,1),null!=e.d?(s=e.d,o>s&&++a):s=null!=e.e?e.e+o:o),r=bt(i,a,s,n,o),t._a[ra]=r.year,t._dayOfYear=r.dayOfYear}function Dt(t){if(t._f===i.ISO_8601)return void st(t);t._a=[],u(t).empty=!0;var e,a,s,o,n,r=""+t._i,l=r.length,h=0;for(s=B(t._f,t._locale).match(Ni)||[],e=0;e0&&u(t).unusedInput.push(n),r=r.slice(r.indexOf(a)+a.length),h+=a.length),Ui[o]?(a?u(t).empty=!1:u(t).unusedTokens.push(o),q(o,a,t)):t._strict&&!a&&u(t).unusedTokens.push(o);u(t).charsLeftOver=l-h,r.length>0&&u(t).unusedInput.push(r),u(t).bigHour===!0&&t._a[ca]<=12&&t._a[ca]>0&&(u(t).bigHour=void 0),t._a[ca]=St(t._locale,t._a[ca],t._meridiem),kt(t),tt(t)}function St(t,e,i){var a;return null==i?e:null!=t.meridiemHour?t.meridiemHour(e,i):null!=t.isPM?(a=t.isPM(i),a&&12>e&&(e+=12),a||12!==e||(e=0),e):e}function wt(t){var e,i,a,s,o;if(0===t._f.length)return u(t).invalidFormat=!0,void(t._d=new Date(NaN));for(s=0;so)&&(a=o,i=e));l(t,i||e)}function Ct(t){if(!t._d){var e=I(t._i);t._a=[e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],kt(t)}}function Mt(t){var e=new m(tt(At(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function At(t){var e=t._i,i=t._f;return t._locale=t._locale||C(t._l),null===e||void 0===i&&""===e?f({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),p(e)?new m(tt(e)):(s(i)?wt(t):i?Dt(t):o(e)?t._d=e:It(t),t))}function It(t){var e=t._i;void 0===e?t._d=new Date:o(e)?t._d=new Date(+e):"string"==typeof e?ot(t):s(e)?(t._a=n(e.slice(0),function(t){return parseInt(t,10)}),kt(t)):"object"==typeof e?Ct(t):"number"==typeof e?t._d=new Date(e):i.createFromInputFallback(t)}function Tt(t,e,i,a,s){var o={};return"boolean"==typeof i&&(a=i,i=void 0),o._isAMomentObject=!0,o._useUTC=o._isUTC=s,o._l=i,o._i=t,o._f=e,o._strict=a,Mt(o)}function Ft(t,e,i,a){return Tt(t,e,i,a,!1)}function Pt(t,e){var i,a;if(1===e.length&&s(e[0])&&(e=e[0]),!e.length)return Ft();for(i=e[0],a=1;at&&(t=-t,i="-"),i+V(~~(t/60),2)+e+V(~~t%60,2)})}function zt(t){var e=(t||"").match(ia)||[],i=e[e.length-1]||[],a=(i+"").match(wa)||["-",0,0],s=+(60*a[1])+v(a[2]);return"+"===a[0]?s:-s}function Bt(t,e){var a,s;return e._isUTC?(a=e.clone(),s=(p(t)||o(t)?+t:+Ft(t))-+a,a._d.setTime(+a._d+s),i.updateOffset(a,!1),a):Ft(t).local()}function Yt(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function Nt(t,e){var a,s=this._offset||0;return null!=t?("string"==typeof t&&(t=zt(t)),Math.abs(t)<16&&(t=60*t),!this._isUTC&&e&&(a=Yt(this)),this._offset=t,this._isUTC=!0,null!=a&&this.add(a,"m"),s!==t&&(!e||this._changeInProgress?ae(this,$t(t-s,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?s:Yt(this)}function Ht(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function Et(t){return this.utcOffset(0,t)}function Ut(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Yt(this),"m")),this}function jt(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(zt(this._i)),this}function qt(t){return t=t?Ft(t).utcOffset():0,(this.utcOffset()-t)%60===0}function Gt(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Zt(){if("undefined"!=typeof this._isDSTShifted)return this._isDSTShifted;var t={};if(g(t,this),t=At(t),t._a){var e=t._isUTC?h(t._a):Ft(t._a);this._isDSTShifted=this.isValid()&&x(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Qt(){return!this._isUTC}function Jt(){return this._isUTC}function Xt(){return this._isUTC&&0===this._offset}function $t(t,e){var i,a,s,o=t,n=null;return Lt(t)?o={ms:t._milliseconds,d:t._days,M:t._months}:"number"==typeof t?(o={},e?o[e]=t:o.milliseconds=t):(n=Ca.exec(t))?(i="-"===n[1]?-1:1,o={y:0,d:v(n[ha])*i,h:v(n[ca])*i,m:v(n[ua])*i,s:v(n[da])*i,ms:v(n[fa])*i}):(n=Ma.exec(t))?(i="-"===n[1]?-1:1,o={y:Kt(n[2],i),M:Kt(n[3],i),d:Kt(n[4],i),h:Kt(n[5],i),m:Kt(n[6],i),s:Kt(n[7],i),w:Kt(n[8],i)}):null==o?o={}:"object"==typeof o&&("from"in o||"to"in o)&&(s=ee(Ft(o.from),Ft(o.to)),o={},o.ms=s.milliseconds,o.M=s.months),a=new Wt(o),Lt(t)&&r(t,"_locale")&&(a._locale=t._locale),a}function Kt(t,e){var i=t&&parseFloat(t.replace(",","."));return(isNaN(i)?0:i)*e}function te(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 ee(t,e){var i;return e=Bt(e,t),t.isBefore(e)?i=te(t,e):(i=te(e,t),i.milliseconds=-i.milliseconds,i.months=-i.months),i}function ie(t,e){return function(i,a){var s,o;return null===a||isNaN(+a)||(at(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period)."),o=i,i=a,a=o),i="string"==typeof i?+i:i,s=$t(i,a),ae(this,s,t),this}}function ae(t,e,a,s){var o=e._milliseconds,n=e._days,r=e._months;s=null==s?!0:s,o&&t._d.setTime(+t._d+o*a),n&&P(t,"Date",F(t,"Date")+n*a),r&&X(t,F(t,"Month")+r*a),s&&i.updateOffset(t,n||r)}function se(t,e){var i=t||Ft(),a=Bt(i,this).startOf("day"),s=this.diff(a,"days",!0),o=-6>s?"sameElse":-1>s?"lastWeek":0>s?"lastDay":1>s?"sameDay":2>s?"nextDay":7>s?"nextWeek":"sameElse";return this.format(e&&e[o]||this.localeData().calendar(o,this,Ft(i)))}function oe(){return new m(this)}function ne(t,e){var i;return e=A("undefined"!=typeof e?e:"millisecond"),"millisecond"===e?(t=p(t)?t:Ft(t),+this>+t):(i=p(t)?+t:+Ft(t),i<+this.clone().startOf(e))}function re(t,e){var i;return e=A("undefined"!=typeof e?e:"millisecond"),"millisecond"===e?(t=p(t)?t:Ft(t),+t>+this):(i=p(t)?+t:+Ft(t),+this.clone().endOf(e)e-o?(i=t.clone().add(s-1,"months"),a=(e-o)/(o-i)):(i=t.clone().add(s+1,"months"),a=(e-o)/(i-o)),-(s+a)}function de(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function fe(){var t=this.clone().utc();return 0e;e++)if(this._weekdaysParse[e]||(i=Ft([2e3,1]).day(e),a="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[e]=new RegExp(a.replace(".",""),"i")),this._weekdaysParse[e].test(t))return e}function Ee(t){var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=ze(t,this.localeData()),this.add(t-e,"d")):e}function Ue(t){var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function je(t){return null==t?this.day()||7:this.day(this.day()%7?t:t-7)}function qe(t,e){W(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function Ge(t,e){return e._meridiemParse}function Ze(t){return"p"===(t+"").toLowerCase().charAt(0)}function Qe(t,e,i){return t>11?i?"pm":"PM":i?"am":"AM"}function Je(t,e){e[fa]=v(1e3*("0."+t))}function Xe(){return this._isUTC?"UTC":""}function $e(){return this._isUTC?"Coordinated Universal Time":""}function Ke(t){return Ft(1e3*t)}function ti(){return Ft.apply(null,arguments).parseZone()}function ei(t,e,i){var a=this._calendar[t];return"function"==typeof a?a.call(e,i):a}function ii(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 ai(){return this._invalidDate}function si(t){return this._ordinal.replace("%d",t)}function oi(t){return t}function ni(t,e,i,a){var s=this._relativeTime[i];return"function"==typeof s?s(t,e,i,a):s.replace(/%d/i,t)}function ri(t,e){var i=this._relativeTime[t>0?"future":"past"];return"function"==typeof i?i(e):i.replace(/%s/i,e)}function li(t){var e,i;for(i in t)e=t[i],"function"==typeof e?this[i]=e:this["_"+i]=e;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function hi(t,e,i,a){var s=C(),o=h().set(a,e);return s[i](o,t)}function ci(t,e,i,a,s){if("number"==typeof t&&(e=t,t=void 0),t=t||"",null!=e)return hi(t,e,i,s);var o,n=[];for(o=0;a>o;o++)n[o]=hi(t,o,i,s);return n}function ui(t,e){return ci(t,e,"months",12,"month")}function di(t,e){return ci(t,e,"monthsShort",12,"month")}function fi(t,e){return ci(t,e,"weekdays",7,"day")}function gi(t,e){return ci(t,e,"weekdaysShort",7,"day")}function mi(t,e){return ci(t,e,"weekdaysMin",7,"day")}function pi(){var t=this._data;return this._milliseconds=Ja(this._milliseconds),this._days=Ja(this._days),this._months=Ja(this._months),t.milliseconds=Ja(t.milliseconds),t.seconds=Ja(t.seconds),t.minutes=Ja(t.minutes),t.hours=Ja(t.hours),t.months=Ja(t.months),t.years=Ja(t.years),this}function bi(t,e,i,a){var s=$t(e,i);return t._milliseconds+=a*s._milliseconds,t._days+=a*s._days,t._months+=a*s._months,t._bubble()}function vi(t,e){return bi(this,t,e,1)}function xi(t,e){return bi(this,t,e,-1)}function yi(t){return 0>t?Math.floor(t):Math.ceil(t)}function ki(){var t,e,i,a,s,o=this._milliseconds,n=this._days,r=this._months,l=this._data;return o>=0&&n>=0&&r>=0||0>=o&&0>=n&&0>=r||(o+=864e5*yi(Di(r)+n),n=0,r=0),l.milliseconds=o%1e3,t=b(o/1e3),l.seconds=t%60,e=b(t/60),l.minutes=e%60,i=b(e/60),l.hours=i%24,n+=b(i/24),s=b(_i(n)),r+=s,n-=yi(Di(s)),a=b(r/12),r%=12,l.days=n,l.months=r,l.years=a,this}function _i(t){return 4800*t/146097}function Di(t){return 146097*t/4800}function Si(t){var e,i,a=this._milliseconds;if(t=A(t),"month"===t||"year"===t)return e=this._days+a/864e5,i=this._months+_i(e),"month"===t?i:i/12;switch(e=this._days+Math.round(Di(this._months)),t){case"week":return e/7+a/6048e5;case"day":return e+a/864e5;case"hour":return 24*e+a/36e5;case"minute":return 1440*e+a/6e4;case"second":return 86400*e+a/1e3;case"millisecond":return Math.floor(864e5*e)+a;default:throw new Error("Unknown unit "+t)}}function wi(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*v(this._months/12)}function Ci(t){return function(){return this.as(t)}}function Mi(t){return t=A(t),this[t+"s"]()}function Ai(t){return function(){return this._data[t]}}function Ii(){return b(this.days()/7)}function Ti(t,e,i,a,s){return s.relativeTime(e||1,!!i,t,a)}function Fi(t,e,i){var a=$t(t).abs(),s=ds(a.as("s")),o=ds(a.as("m")),n=ds(a.as("h")),r=ds(a.as("d")),l=ds(a.as("M")),h=ds(a.as("y")),c=s0,c[4]=i,Ti.apply(null,c)}function Pi(t,e){return void 0===fs[t]?!1:void 0===e?fs[t]:(fs[t]=e,!0)}function Oi(t){var e=this.localeData(),i=Fi(this,!t,e);return t&&(i=e.pastFuture(+this,i)),e.postformat(i)}function Vi(){var t,e,i,a=gs(this._milliseconds)/1e3,s=gs(this._days),o=gs(this._months);t=b(a/60),e=b(t/60),a%=60,t%=60,i=b(o/12),o%=12;var n=i,r=o,l=s,h=e,c=t,u=a,d=this.asSeconds();return d?(0>d?"-":"")+"P"+(n?n+"Y":"")+(r?r+"M":"")+(l?l+"D":"")+(h||c||u?"T":"")+(h?h+"H":"")+(c?c+"M":"")+(u?u+"S":""):"P0D"}var Wi,Li,Ri=i.momentProperties=[],zi=!1,Bi={},Yi={},Ni=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Hi=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Ei={},Ui={},ji=/\d/,qi=/\d\d/,Gi=/\d{3}/,Zi=/\d{4}/,Qi=/[+-]?\d{6}/,Ji=/\d\d?/,Xi=/\d{1,3}/,$i=/\d{1,4}/,Ki=/[+-]?\d{1,6}/,ta=/\d+/,ea=/[+-]?\d+/,ia=/Z|[+-]\d\d:?\d\d/gi,aa=/[+-]?\d+(\.\d{1,3})?/,sa=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,oa={},na={},ra=0,la=1,ha=2,ca=3,ua=4,da=5,fa=6;W("M",["MM",2],"Mo",function(){return this.month()+1}),W("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),W("MMMM",0,0,function(t){return this.localeData().months(this,t)}),M("month","M"),N("M",Ji),N("MM",Ji,qi),N("MMM",sa),N("MMMM",sa),U(["M","MM"],function(t,e){e[la]=v(t)-1}),U(["MMM","MMMM"],function(t,e,i,a){var s=i._locale.monthsParse(t,a,i._strict);null!=s?e[la]=s:u(i).invalidMonth=t});var ga="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ma="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),pa={};i.suppressDeprecationWarnings=!1;var ba=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,va=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],xa=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],ya=/^\/?Date\((\-?\d+)/i;i.createFromInputFallback=it("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),W(0,["YY",2],0,function(){return this.year()%100}),W(0,["YYYY",4],0,"year"),W(0,["YYYYY",5],0,"year"),W(0,["YYYYYY",6,!0],0,"year"),M("year","y"),N("Y",ea),N("YY",Ji,qi),N("YYYY",$i,Zi),N("YYYYY",Ki,Qi),N("YYYYYY",Ki,Qi),U(["YYYYY","YYYYYY"],ra),U("YYYY",function(t,e){e[ra]=2===t.length?i.parseTwoDigitYear(t):v(t)}),U("YY",function(t,e){e[ra]=i.parseTwoDigitYear(t)}),i.parseTwoDigitYear=function(t){return v(t)+(v(t)>68?1900:2e3)};var ka=T("FullYear",!1);W("w",["ww",2],"wo","week"),W("W",["WW",2],"Wo","isoWeek"),M("week","w"),M("isoWeek","W"),N("w",Ji),N("ww",Ji,qi),N("W",Ji),N("WW",Ji,qi),j(["w","ww","W","WW"],function(t,e,i,a){e[a.substr(0,1)]=v(t)});var _a={dow:0,doy:6};W("DDD",["DDDD",3],"DDDo","dayOfYear"),M("dayOfYear","DDD"),N("DDD",Xi),N("DDDD",Gi),U(["DDD","DDDD"],function(t,e,i){i._dayOfYear=v(t)}),i.ISO_8601=function(){};var Da=it("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var t=Ft.apply(null,arguments);return this>t?this:t}),Sa=it("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var t=Ft.apply(null,arguments);return t>this?this:t});Rt("Z",":"),Rt("ZZ",""),N("Z",ia),N("ZZ",ia),U(["Z","ZZ"],function(t,e,i){i._useUTC=!0,i._tzm=zt(t)});var wa=/([\+\-]|\d\d)/gi;i.updateOffset=function(){};var Ca=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,Ma=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/;$t.fn=Wt.prototype;var Aa=ie(1,"add"),Ia=ie(-1,"subtract");i.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";var Ta=it("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)});W(0,["gg",2],0,function(){return this.weekYear()%100}),W(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Fe("gggg","weekYear"),Fe("ggggg","weekYear"),Fe("GGGG","isoWeekYear"),Fe("GGGGG","isoWeekYear"),M("weekYear","gg"),M("isoWeekYear","GG"),N("G",ea),N("g",ea),N("GG",Ji,qi),N("gg",Ji,qi),N("GGGG",$i,Zi),N("gggg",$i,Zi),N("GGGGG",Ki,Qi),N("ggggg",Ki,Qi),j(["gggg","ggggg","GGGG","GGGGG"],function(t,e,i,a){e[a.substr(0,2)]=v(t)}),j(["gg","GG"],function(t,e,a,s){e[s]=i.parseTwoDigitYear(t)}),W("Q",0,0,"quarter"),M("quarter","Q"),N("Q",ji),U("Q",function(t,e){e[la]=3*(v(t)-1)}),W("D",["DD",2],"Do","date"),M("date","D"),N("D",Ji),N("DD",Ji,qi),N("Do",function(t,e){return t?e._ordinalParse:e._ordinalParseLenient}),U(["D","DD"],ha),U("Do",function(t,e){e[ha]=v(t.match(Ji)[0],10)});var Fa=T("Date",!0);W("d",0,"do","day"),W("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),W("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),W("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),W("e",0,0,"weekday"),W("E",0,0,"isoWeekday"),M("day","d"),M("weekday","e"),M("isoWeekday","E"),N("d",Ji),N("e",Ji),N("E",Ji),N("dd",sa),N("ddd",sa),N("dddd",sa),j(["dd","ddd","dddd"],function(t,e,i){var a=i._locale.weekdaysParse(t);null!=a?e.d=a:u(i).invalidWeekday=t}),j(["d","e","E"],function(t,e,i,a){e[a]=v(t)});var Pa="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Oa="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Va="Su_Mo_Tu_We_Th_Fr_Sa".split("_");W("H",["HH",2],0,"hour"),W("h",["hh",2],0,function(){return this.hours()%12||12}),qe("a",!0),qe("A",!1),M("hour","h"),N("a",Ge),N("A",Ge),N("H",Ji),N("h",Ji),N("HH",Ji,qi),N("hh",Ji,qi),U(["H","HH"],ca),U(["a","A"],function(t,e,i){i._isPm=i._locale.isPM(t),i._meridiem=t}),U(["h","hh"],function(t,e,i){e[ca]=v(t),u(i).bigHour=!0});var Wa=/[ap]\.?m?\.?/i,La=T("Hours",!0);W("m",["mm",2],0,"minute"),M("minute","m"),N("m",Ji),N("mm",Ji,qi),U(["m","mm"],ua);var Ra=T("Minutes",!1);W("s",["ss",2],0,"second"),M("second","s"),N("s",Ji),N("ss",Ji,qi),U(["s","ss"],da);var za=T("Seconds",!1);W("S",0,0,function(){return~~(this.millisecond()/100)}),W(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),W(0,["SSS",3],0,"millisecond"),W(0,["SSSS",4],0,function(){return 10*this.millisecond()}),W(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),W(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),W(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),W(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),W(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),M("millisecond","ms"),N("S",Xi,ji),N("SS",Xi,qi),N("SSS",Xi,Gi);var Ba;for(Ba="SSSS";Ba.length<=9;Ba+="S")N(Ba,ta);for(Ba="S";Ba.length<=9;Ba+="S")U(Ba,Je);var Ya=T("Milliseconds",!1);W("z",0,0,"zoneAbbr"),W("zz",0,0,"zoneName");var Na=m.prototype;Na.add=Aa,Na.calendar=se,Na.clone=oe,Na.diff=ce,Na.endOf=_e,Na.format=ge,Na.from=me,Na.fromNow=pe,Na.to=be,Na.toNow=ve,Na.get=O,Na.invalidAt=Te,Na.isAfter=ne,Na.isBefore=re,Na.isBetween=le,Na.isSame=he,Na.isValid=Ae,Na.lang=Ta,Na.locale=xe,Na.localeData=ye,Na.max=Sa,Na.min=Da,Na.parsingFlags=Ie,Na.set=O,Na.startOf=ke,Na.subtract=Ia,Na.toArray=Ce,Na.toObject=Me,Na.toDate=we,Na.toISOString=fe,Na.toJSON=fe,Na.toString=de,Na.unix=Se,Na.valueOf=De,Na.year=ka,Na.isLeapYear=ct,Na.weekYear=Oe,Na.isoWeekYear=Ve,Na.quarter=Na.quarters=Re,Na.month=$,Na.daysInMonth=K,Na.week=Na.weeks=mt,Na.isoWeek=Na.isoWeeks=pt,Na.weeksInYear=Le,Na.isoWeeksInYear=We,Na.date=Fa,Na.day=Na.days=Ee,Na.weekday=Ue,Na.isoWeekday=je,Na.dayOfYear=vt,Na.hour=Na.hours=La,Na.minute=Na.minutes=Ra,Na.second=Na.seconds=za,Na.millisecond=Na.milliseconds=Ya, +Na.utcOffset=Nt,Na.utc=Et,Na.local=Ut,Na.parseZone=jt,Na.hasAlignedHourOffset=qt,Na.isDST=Gt,Na.isDSTShifted=Zt,Na.isLocal=Qt,Na.isUtcOffset=Jt,Na.isUtc=Xt,Na.isUTC=Xt,Na.zoneAbbr=Xe,Na.zoneName=$e,Na.dates=it("dates accessor is deprecated. Use date instead.",Fa),Na.months=it("months accessor is deprecated. Use month instead",$),Na.years=it("years accessor is deprecated. Use year instead",ka),Na.zone=it("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",Ht);var Ha=Na,Ea={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},Ua={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"},ja="Invalid date",qa="%d",Ga=/\d{1,2}/,Za={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"},Qa=y.prototype;Qa._calendar=Ea,Qa.calendar=ei,Qa._longDateFormat=Ua,Qa.longDateFormat=ii,Qa._invalidDate=ja,Qa.invalidDate=ai,Qa._ordinal=qa,Qa.ordinal=si,Qa._ordinalParse=Ga,Qa.preparse=oi,Qa.postformat=oi,Qa._relativeTime=Za,Qa.relativeTime=ni,Qa.pastFuture=ri,Qa.set=li,Qa.months=Z,Qa._months=ga,Qa.monthsShort=Q,Qa._monthsShort=ma,Qa.monthsParse=J,Qa.week=dt,Qa._week=_a,Qa.firstDayOfYear=gt,Qa.firstDayOfWeek=ft,Qa.weekdays=Be,Qa._weekdays=Pa,Qa.weekdaysMin=Ne,Qa._weekdaysMin=Va,Qa.weekdaysShort=Ye,Qa._weekdaysShort=Oa,Qa.weekdaysParse=He,Qa.isPM=Ze,Qa._meridiemParse=Wa,Qa.meridiem=Qe,S("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,i=1===v(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+i}}),i.lang=it("moment.lang is deprecated. Use moment.locale instead.",S),i.langData=it("moment.langData is deprecated. Use moment.localeData instead.",C);var Ja=Math.abs,Xa=Ci("ms"),$a=Ci("s"),Ka=Ci("m"),ts=Ci("h"),es=Ci("d"),is=Ci("w"),as=Ci("M"),ss=Ci("y"),os=Ai("milliseconds"),ns=Ai("seconds"),rs=Ai("minutes"),ls=Ai("hours"),hs=Ai("days"),cs=Ai("months"),us=Ai("years"),ds=Math.round,fs={s:45,m:45,h:22,d:26,M:11},gs=Math.abs,ms=Wt.prototype;ms.abs=pi,ms.add=vi,ms.subtract=xi,ms.as=Si,ms.asMilliseconds=Xa,ms.asSeconds=$a,ms.asMinutes=Ka,ms.asHours=ts,ms.asDays=es,ms.asWeeks=is,ms.asMonths=as,ms.asYears=ss,ms.valueOf=wi,ms._bubble=ki,ms.get=Mi,ms.milliseconds=os,ms.seconds=ns,ms.minutes=rs,ms.hours=ls,ms.days=hs,ms.weeks=Ii,ms.months=cs,ms.years=us,ms.humanize=Oi,ms.toISOString=Vi,ms.toString=Vi,ms.toJSON=Vi,ms.locale=xe,ms.localeData=ye,ms.toIsoString=it("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Vi),ms.lang=Ta,W("X",0,0,"unix"),W("x",0,0,"valueOf"),N("x",ea),N("X",aa),U("X",function(t,e,i){i._d=new Date(1e3*parseFloat(t,10))}),U("x",function(t,e,i){i._d=new Date(v(t))}),i.version="2.10.6",a(Ft),i.fn=Ha,i.min=Ot,i.max=Vt,i.utc=h,i.unix=Ke,i.months=ui,i.isDate=o,i.locale=S,i.invalid=f,i.duration=$t,i.isMoment=p,i.weekdays=fi,i.parseZone=ti,i.localeData=C,i.isDuration=Lt,i.monthsShort=di,i.weekdaysMin=mi,i.defineLocale=w,i.weekdaysShort=gi,i.normalizeUnits=A,i.relativeTimeThreshold=Pi;var ps=i;return ps})},{}],7:[function(t,e,i){/*! * Chart.js * http://chartjs.org/ - * Version: 2.0.0 + * Version: 2.0.2 * * Copyright 2015 Nick Downie * Released under the MIT license * https://github.com/nnnick/Chart.js/blob/master/LICENSE.md */ -var s=t("./core/core.js")();t("./core/core.helpers")(s),t("./core/core.element")(s),t("./core/core.animation")(s),t("./core/core.controller")(s),t("./core/core.datasetController")(s),t("./core/core.layoutService")(s),t("./core/core.legend")(s),t("./core/core.scale")(s),t("./core/core.scaleService")(s),t("./core/core.title")(s),t("./core/core.tooltip")(s),t("./controllers/controller.bar")(s),t("./controllers/controller.bubble")(s),t("./controllers/controller.doughnut")(s),t("./controllers/controller.line")(s),t("./controllers/controller.polarArea")(s),t("./controllers/controller.radar")(s),t("./scales/scale.category")(s),t("./scales/scale.linear")(s),t("./scales/scale.logarithmic")(s),t("./scales/scale.radialLinear")(s),t("./scales/scale.time")(s),t("./elements/element.arc")(s),t("./elements/element.line")(s),t("./elements/element.point")(s),t("./elements/element.rectangle")(s),t("./charts/Chart.Bar")(s),t("./charts/Chart.Bubble")(s),t("./charts/Chart.Doughnut")(s),t("./charts/Chart.Line")(s),t("./charts/Chart.PolarArea")(s),t("./charts/Chart.Radar")(s),t("./charts/Chart.Scatter")(s),window.Chart=e.exports=s},{"./charts/Chart.Bar":8,"./charts/Chart.Bubble":9,"./charts/Chart.Doughnut":10,"./charts/Chart.Line":11,"./charts/Chart.PolarArea":12,"./charts/Chart.Radar":13,"./charts/Chart.Scatter":14,"./controllers/controller.bar":15,"./controllers/controller.bubble":16,"./controllers/controller.doughnut":17,"./controllers/controller.line":18,"./controllers/controller.polarArea":19,"./controllers/controller.radar":20,"./core/core.animation":21,"./core/core.controller":22,"./core/core.datasetController":23,"./core/core.element":24,"./core/core.helpers":25,"./core/core.js":26,"./core/core.layoutService":27,"./core/core.legend":28,"./core/core.scale":29,"./core/core.scaleService":30,"./core/core.title":31,"./core/core.tooltip":32,"./elements/element.arc":33,"./elements/element.line":34,"./elements/element.point":35,"./elements/element.rectangle":36,"./scales/scale.category":37,"./scales/scale.linear":38,"./scales/scale.logarithmic":39,"./scales/scale.radialLinear":40,"./scales/scale.time":41}],8:[function(t,e,i){"use strict";e.exports=function(t){t.Bar=function(e,i){return i.type="bar",new t(e,i)}}},{}],9:[function(t,e,i){"use strict";e.exports=function(t){t.Bubble=function(e,i){return i.type="bubble",new t(e,i)}}},{}],10:[function(t,e,i){"use strict";e.exports=function(t){t.Doughnut=function(e,i){return i.type="doughnut",new t(e,i)}}},{}],11:[function(t,e,i){"use strict";e.exports=function(t){t.Line=function(e,i){return i.type="line",new t(e,i)}}},{}],12:[function(t,e,i){"use strict";e.exports=function(t){t.PolarArea=function(e,i){return i.type="polarArea",new t(e,i)}}},{}],13:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i={aspectRatio:1};t.Radar=function(s,a){return a.options=e.configMerge(i,a.options),a.type="radar",new t(s,a)}}},{}],14:[function(t,e,i){"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(t,e){return""},label:function(t,e){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,i){"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({initialize:function(e,i){t.DatasetController.prototype.initialize.call(this,e,i),this.getDataset().bar=!0},getBarCount:function(){var t=0;return e.each(this.chart.data.datasets,function(i){e.isDatasetVisible(i)&&i.bar&&++t}),t},addElements:function(){this.getDataset().metaData=this.getDataset().metaData||[],e.each(this.getDataset().data,function(e,i){this.getDataset().metaData[i]=this.getDataset().metaData[i]||new t.elements.Rectangle({_chart:this.chart.chart,_datasetIndex:this.index,_index:i})},this)},addElementAndReset:function(e){this.getDataset().metaData=this.getDataset().metaData||[];var i=new t.elements.Rectangle({_chart:this.chart.chart,_datasetIndex:this.index,_index:e}),s=this.getBarCount();this.updateElement(i,e,!0,s),this.getDataset().metaData.splice(e,0,i)},update:function(t){var i=this.getBarCount();e.each(this.getDataset().metaData,function(e,s){this.updateElement(e,s,t,i)},this)},updateElement:function(t,i,s,a){var o,n=this.getScaleForId(this.getDataset().xAxisID),r=this.getScaleForId(this.getDataset().yAxisID);o=r.min<0&&r.max<0?r.getPixelForValue(r.max):r.min>0&&r.max>0?r.getPixelForValue(r.min):r.getPixelForValue(0),e.extend(t,{_chart:this.chart.chart,_xScale:n,_yScale:r,_datasetIndex:this.index,_index:i,_model:{x:this.calculateBarX(i,this.index),y:s?o:this.calculateBarY(i,this.index),label:this.chart.data.labels[i],datasetLabel:this.getDataset().label,base:s?o:this.calculateBarBase(this.index,i),width:this.calculateBarWidth(a),backgroundColor:t.custom&&t.custom.backgroundColor?t.custom.backgroundColor:e.getValueAtIndexOrDefault(this.getDataset().backgroundColor,i,this.chart.options.elements.rectangle.backgroundColor),borderSkipped:t.custom&&t.custom.borderSkipped?t.custom.borderSkipped:this.chart.options.elements.rectangle.borderSkipped,borderColor:t.custom&&t.custom.borderColor?t.custom.borderColor:e.getValueAtIndexOrDefault(this.getDataset().borderColor,i,this.chart.options.elements.rectangle.borderColor),borderWidth:t.custom&&t.custom.borderWidth?t.custom.borderWidth:e.getValueAtIndexOrDefault(this.getDataset().borderWidth,i,this.chart.options.elements.rectangle.borderWidth)}}),t.pivot()},calculateBarBase:function(t,i){var s=(this.getScaleForId(this.getDataset().xAxisID),this.getScaleForId(this.getDataset().yAxisID)),a=0;if(s.options.stacked){var o=this.chart.data.datasets[t].data[i];if(0>o)for(var n=0;t>n;n++){var r=this.chart.data.datasets[n];e.isDatasetVisible(r)&&r.yAxisID===s.id&&r.bar&&(a+=r.data[i]<0?r.data[i]:0)}else for(var l=0;t>l;l++){var h=this.chart.data.datasets[l];e.isDatasetVisible(h)&&h.yAxisID===s.id&&h.bar&&(a+=h.data[i]>0?h.data[i]:0)}return s.getPixelForValue(a)}return a=s.getPixelForValue(s.min),s.beginAtZero||s.min<=0&&s.max>=0||s.min>=0&&s.max<=0?a=s.getPixelForValue(0,0):s.min<0&&s.max<0&&(a=s.getPixelForValue(s.max)),a},getRuler:function(){var t=this.getScaleForId(this.getDataset().xAxisID),e=(this.getScaleForId(this.getDataset().yAxisID),this.getBarCount()),i=function(){for(var e=t.getPixelForTick(1)-t.getPixelForTick(0),i=2;is;++s)e.isDatasetVisible(this.chart.data.datasets[s])&&this.chart.data.datasets[s].bar&&++i;return i},calculateBarX:function(t,e){var i=(this.getScaleForId(this.getDataset().yAxisID),this.getScaleForId(this.getDataset().xAxisID)),s=this.getBarIndex(e),a=this.getRuler(),o=i.getPixelForValue(null,t,e,this.chart.isCombo);return o-=this.chart.isCombo?a.tickWidth/2:0,i.options.stacked?o+a.categoryWidth/2+a.categorySpacing:o+a.barWidth/2+a.categorySpacing+a.barWidth*s+a.barSpacing/2+a.barSpacing*s},calculateBarY:function(t,i){var s=(this.getScaleForId(this.getDataset().xAxisID),this.getScaleForId(this.getDataset().yAxisID)),a=this.getDataset().data[t];if(s.options.stacked){for(var o=0,n=0,r=0;i>r;r++){var l=this.chart.data.datasets[r];e.isDatasetVisible(l)&&l.bar&&l.yAxisID===s.id&&(l.data[t]<0?n+=l.data[t]||0:o+=l.data[t]||0)}return 0>a?s.getPixelForValue(n+a):s.getPixelForValue(o+a)}return s.getPixelForValue(a)},draw:function(t){var i=t||1;e.each(this.getDataset().metaData,function(t,e){var s=this.getDataset().data[e];null===s||void 0===s||isNaN(s)||t.transition(i).draw()},this)},setHoverStyle:function(t){var i=this.chart.data.datasets[t._datasetIndex],s=t._index;t._model.backgroundColor=t.custom&&t.custom.hoverBackgroundColor?t.custom.hoverBackgroundColor:e.getValueAtIndexOrDefault(i.hoverBackgroundColor,s,e.color(t._model.backgroundColor).saturate(.5).darken(.1).rgbString()),t._model.borderColor=t.custom&&t.custom.hoverBorderColor?t.custom.hoverBorderColor:e.getValueAtIndexOrDefault(i.hoverBorderColor,s,e.color(t._model.borderColor).saturate(.5).darken(.1).rgbString()),t._model.borderWidth=t.custom&&t.custom.hoverBorderWidth?t.custom.hoverBorderWidth:e.getValueAtIndexOrDefault(i.hoverBorderWidth,s,t._model.borderWidth)},removeHoverStyle:function(t){var i=(this.chart.data.datasets[t._datasetIndex],t._index);t._model.backgroundColor=t.custom&&t.custom.backgroundColor?t.custom.backgroundColor:e.getValueAtIndexOrDefault(this.getDataset().backgroundColor,i,this.chart.options.elements.rectangle.backgroundColor),t._model.borderColor=t.custom&&t.custom.borderColor?t.custom.borderColor:e.getValueAtIndexOrDefault(this.getDataset().borderColor,i,this.chart.options.elements.rectangle.borderColor),t._model.borderWidth=t.custom&&t.custom.borderWidth?t.custom.borderWidth:e.getValueAtIndexOrDefault(this.getDataset().borderWidth,i,this.chart.options.elements.rectangle.borderWidth)}})}},{}],16:[function(t,e,i){"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(t,e){return""},label:function(t,e){var i=e.datasets[t.datasetIndex].label||"",s=e.datasets[t.datasetIndex].data[t.index];return i+": ("+s.x+", "+s.y+", "+s.r+")"}}}},t.controllers.bubble=t.DatasetController.extend({addElements:function(){this.getDataset().metaData=this.getDataset().metaData||[],e.each(this.getDataset().data,function(e,i){this.getDataset().metaData[i]=this.getDataset().metaData[i]||new t.elements.Point({_chart:this.chart.chart,_datasetIndex:this.index,_index:i})},this)},addElementAndReset:function(e){this.getDataset().metaData=this.getDataset().metaData||[];var i=new t.elements.Point({_chart:this.chart.chart,_datasetIndex:this.index,_index:e});this.updateElement(i,e,!0),this.getDataset().metaData.splice(e,0,i)},update:function(t){var i,s=this.getDataset().metaData,a=this.getScaleForId(this.getDataset().yAxisID);this.getScaleForId(this.getDataset().xAxisID);i=a.min<0&&a.max<0?a.getPixelForValue(a.max):a.min>0&&a.max>0?a.getPixelForValue(a.min):a.getPixelForValue(0),e.each(s,function(e,i){this.updateElement(e,i,t)},this)},updateElement:function(t,i,s){var a,o=this.getScaleForId(this.getDataset().yAxisID),n=this.getScaleForId(this.getDataset().xAxisID);a=o.min<0&&o.max<0?o.getPixelForValue(o.max):o.min>0&&o.max>0?o.getPixelForValue(o.min):o.getPixelForValue(0),e.extend(t,{_chart:this.chart.chart,_xScale:n,_yScale:o,_datasetIndex:this.index,_index:i,_model:{x:s?n.getPixelForDecimal(.5):n.getPixelForValue(this.getDataset().data[i],i,this.index,this.chart.isCombo),y:s?a:o.getPixelForValue(this.getDataset().data[i],i,this.index),radius:s?0:t.custom&&t.custom.radius?t.custom.radius:this.getRadius(this.getDataset().data[i]),backgroundColor:t.custom&&t.custom.backgroundColor?t.custom.backgroundColor:e.getValueAtIndexOrDefault(this.getDataset().backgroundColor,i,this.chart.options.elements.point.backgroundColor),borderColor:t.custom&&t.custom.borderColor?t.custom.borderColor:e.getValueAtIndexOrDefault(this.getDataset().borderColor,i,this.chart.options.elements.point.borderColor),borderWidth:t.custom&&t.custom.borderWidth?t.custom.borderWidth:e.getValueAtIndexOrDefault(this.getDataset().borderWidth,i,this.chart.options.elements.point.borderWidth),hitRadius:t.custom&&t.custom.hitRadius?t.custom.hitRadius:e.getValueAtIndexOrDefault(this.getDataset().hitRadius,i,this.chart.options.elements.point.hitRadius)}}),t._model.skip=t.custom&&t.custom.skip?t.custom.skip:isNaN(t._model.x)||isNaN(t._model.y),t.pivot()},getRadius:function(t){return t.r||this.chart.options.elements.point.radius},draw:function(t){var i=t||1;e.each(this.getDataset().metaData,function(t,e){t.transition(i),t.draw()})},setHoverStyle:function(t){var i=this.chart.data.datasets[t._datasetIndex],s=t._index;t._model.radius=t.custom&&t.custom.hoverRadius?t.custom.hoverRadius:e.getValueAtIndexOrDefault(i.hoverRadius,s,this.chart.options.elements.point.hoverRadius)+this.getRadius(this.getDataset().data[t._index]),t._model.backgroundColor=t.custom&&t.custom.hoverBackgroundColor?t.custom.hoverBackgroundColor:e.getValueAtIndexOrDefault(i.hoverBackgroundColor,s,e.color(t._model.backgroundColor).saturate(.5).darken(.1).rgbString()),t._model.borderColor=t.custom&&t.custom.hoverBorderColor?t.custom.hoverBorderColor:e.getValueAtIndexOrDefault(i.hoverBorderColor,s,e.color(t._model.borderColor).saturate(.5).darken(.1).rgbString()),t._model.borderWidth=t.custom&&t.custom.hoverBorderWidth?t.custom.hoverBorderWidth:e.getValueAtIndexOrDefault(i.hoverBorderWidth,s,t._model.borderWidth)},removeHoverStyle:function(t){var i=(this.chart.data.datasets[t._datasetIndex],t._index);t._model.radius=t.custom&&t.custom.radius?t.custom.radius:this.getRadius(this.getDataset().data[t._index]),t._model.backgroundColor=t.custom&&t.custom.backgroundColor?t.custom.backgroundColor:e.getValueAtIndexOrDefault(this.getDataset().backgroundColor,i,this.chart.options.elements.point.backgroundColor),t._model.borderColor=t.custom&&t.custom.borderColor?t.custom.borderColor:e.getValueAtIndexOrDefault(this.getDataset().borderColor,i,this.chart.options.elements.point.borderColor),t._model.borderWidth=t.custom&&t.custom.borderWidth?t.custom.borderWidth:e.getValueAtIndexOrDefault(this.getDataset().borderWidth,i,this.chart.options.elements.point.borderWidth)}})}},{}],17:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.doughnut={animation:{animateRotate:!0,animateScale:!1},aspectRatio:1,hover:{mode:"single"},legendCallback:function(t){var e=[];if(e.push('
    '),t.data.datasets.length)for(var i=0;i'),t.data.labels[i]&&e.push(t.data.labels[i]),e.push("");return e.push("
"),e.join("")},legend:{labels:{generateLabels:function(t){return t.labels.length&&t.datasets.length?t.labels.map(function(e,i){return{text:e,fillStyle:t.datasets[0].backgroundColor[i],hidden:isNaN(t.datasets[0].data[i]),index:i}}):[]}},onClick:function(t,i){e.each(this.chart.data.datasets,function(t){t.metaHiddenData=t.metaHiddenData||[];var e=i.index;isNaN(t.data[e])?isNaN(t.metaHiddenData[e])||(t.data[e]=t.metaHiddenData[e]):(t.metaHiddenData[e]=t.data[e],t.data[e]=NaN)}),this.chart.update()}},cutoutPercentage:50,tooltips:{callbacks:{title:function(){return""},label:function(t,e){return e.labels[t.index]+": "+e.datasets[t.datasetIndex].data[t.index]}}}},t.defaults.pie=e.clone(t.defaults.doughnut),e.extend(t.defaults.pie,{cutoutPercentage:0}),t.controllers.doughnut=t.controllers.pie=t.DatasetController.extend({linkScales:function(){},addElements:function(){this.getDataset().metaData=this.getDataset().metaData||[],e.each(this.getDataset().data,function(e,i){this.getDataset().metaData[i]=this.getDataset().metaData[i]||new t.elements.Arc({_chart:this.chart.chart,_datasetIndex:this.index,_index:i})},this)},addElementAndReset:function(i,s){this.getDataset().metaData=this.getDataset().metaData||[];var a=new t.elements.Arc({_chart:this.chart.chart,_datasetIndex:this.index,_index:i});s&&e.isArray(this.getDataset().backgroundColor)&&this.getDataset().backgroundColor.splice(i,0,s),this.updateElement(a,i,!0),this.getDataset().metaData.splice(i,0,a)},getVisibleDatasetCount:function(){return e.where(this.chart.data.datasets,function(t){return e.isDatasetVisible(t)}).length},getRingIndex:function(t){for(var i=0,s=0;t>s;++s)e.isDatasetVisible(this.chart.data.datasets[s])&&++i;return i},update:function(t){var i=Math.min(this.chart.chartArea.right-this.chart.chartArea.left,this.chart.chartArea.bottom-this.chart.chartArea.top);this.chart.outerRadius=Math.max(i/2-this.chart.options.elements.arc.borderWidth/2,0),this.chart.innerRadius=Math.max(this.chart.options.cutoutPercentage?this.chart.outerRadius/100*this.chart.options.cutoutPercentage:1,0),this.chart.radiusLength=(this.chart.outerRadius-this.chart.innerRadius)/this.getVisibleDatasetCount(),this.getDataset().total=0,e.each(this.getDataset().data,function(t){isNaN(t)||(this.getDataset().total+=Math.abs(t))},this),this.outerRadius=this.chart.outerRadius-this.chart.radiusLength*this.getRingIndex(this.index),this.innerRadius=this.outerRadius-this.chart.radiusLength,e.each(this.getDataset().metaData,function(e,i){this.updateElement(e,i,t)},this)},updateElement:function(t,i,s){var a=(this.chart.chartArea.left+this.chart.chartArea.right)/2,o=(this.chart.chartArea.top+this.chart.chartArea.bottom)/2,n=Math.PI*-.5,r=Math.PI*-.5,l=s&&this.chart.options.animation.animateRotate?0:this.calculateCircumference(this.getDataset().data[i]),h=s&&this.chart.options.animation.animateScale?0:this.innerRadius,c=s&&this.chart.options.animation.animateScale?0:this.outerRadius;e.extend(t,{_chart:this.chart.chart,_datasetIndex:this.index,_index:i,_model:{x:a,y:o,startAngle:n,endAngle:r,circumference:l,outerRadius:c,innerRadius:h,backgroundColor:t.custom&&t.custom.backgroundColor?t.custom.backgroundColor:e.getValueAtIndexOrDefault(this.getDataset().backgroundColor,i,this.chart.options.elements.arc.backgroundColor),hoverBackgroundColor:t.custom&&t.custom.hoverBackgroundColor?t.custom.hoverBackgroundColor:e.getValueAtIndexOrDefault(this.getDataset().hoverBackgroundColor,i,this.chart.options.elements.arc.hoverBackgroundColor),borderWidth:t.custom&&t.custom.borderWidth?t.custom.borderWidth:e.getValueAtIndexOrDefault(this.getDataset().borderWidth,i,this.chart.options.elements.arc.borderWidth),borderColor:t.custom&&t.custom.borderColor?t.custom.borderColor:e.getValueAtIndexOrDefault(this.getDataset().borderColor,i,this.chart.options.elements.arc.borderColor),label:e.getValueAtIndexOrDefault(this.getDataset().label,i,this.chart.data.labels[i])}}),s||(0===i?t._model.startAngle=Math.PI*-.5:t._model.startAngle=this.getDataset().metaData[i-1]._model.endAngle,t._model.endAngle=t._model.startAngle+t._model.circumference),t.pivot()},draw:function(t){var i=t||1;e.each(this.getDataset().metaData,function(t,e){t.transition(i).draw()})},setHoverStyle:function(t){var i=this.chart.data.datasets[t._datasetIndex],s=t._index;t._model.backgroundColor=t.custom&&t.custom.hoverBackgroundColor?t.custom.hoverBackgroundColor:e.getValueAtIndexOrDefault(i.hoverBackgroundColor,s,e.color(t._model.backgroundColor).saturate(.5).darken(.1).rgbString()),t._model.borderColor=t.custom&&t.custom.hoverBorderColor?t.custom.hoverBorderColor:e.getValueAtIndexOrDefault(i.hoverBorderColor,s,e.color(t._model.borderColor).saturate(.5).darken(.1).rgbString()),t._model.borderWidth=t.custom&&t.custom.hoverBorderWidth?t.custom.hoverBorderWidth:e.getValueAtIndexOrDefault(i.hoverBorderWidth,s,t._model.borderWidth)},removeHoverStyle:function(t){var i=(this.chart.data.datasets[t._datasetIndex],t._index);t._model.backgroundColor=t.custom&&t.custom.backgroundColor?t.custom.backgroundColor:e.getValueAtIndexOrDefault(this.getDataset().backgroundColor,i,this.chart.options.elements.arc.backgroundColor),t._model.borderColor=t.custom&&t.custom.borderColor?t.custom.borderColor:e.getValueAtIndexOrDefault(this.getDataset().borderColor,i,this.chart.options.elements.arc.borderColor),t._model.borderWidth=t.custom&&t.custom.borderWidth?t.custom.borderWidth:e.getValueAtIndexOrDefault(this.getDataset().borderWidth,i,this.chart.options.elements.arc.borderWidth)},calculateCircumference:function(t){return this.getDataset().total>0&&!isNaN(t)?1.999999*Math.PI*(t/this.getDataset().total):0}})}},{}],18:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.line={showLines:!0,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}},t.controllers.line=t.DatasetController.extend({addElements:function(){this.getDataset().metaData=this.getDataset().metaData||[],this.getDataset().metaDataset=this.getDataset().metaDataset||new t.elements.Line({_chart:this.chart.chart,_datasetIndex:this.index,_points:this.getDataset().metaData}),e.each(this.getDataset().data,function(e,i){this.getDataset().metaData[i]=this.getDataset().metaData[i]||new t.elements.Point({_chart:this.chart.chart,_datasetIndex:this.index,_index:i})},this)},addElementAndReset:function(e){this.getDataset().metaData=this.getDataset().metaData||[];var i=new t.elements.Point({_chart:this.chart.chart,_datasetIndex:this.index,_index:e});this.updateElement(i,e,!0),this.getDataset().metaData.splice(e,0,i),this.chart.options.showLines&&0!==this.chart.options.elements.line.tension&&this.updateBezierControlPoints()},update:function(t){var i,s=this.getDataset().metaDataset,a=this.getDataset().metaData,o=this.getScaleForId(this.getDataset().yAxisID);this.getScaleForId(this.getDataset().xAxisID);i=o.min<0&&o.max<0?o.getPixelForValue(o.max):o.min>0&&o.max>0?o.getPixelForValue(o.min):o.getPixelForValue(0),this.chart.options.showLines&&(s._scale=o,s._datasetIndex=this.index,s._children=a,s._model={tension:s.custom&&s.custom.tension?s.custom.tension:e.getValueOrDefault(this.getDataset().tension,this.chart.options.elements.line.tension),backgroundColor:s.custom&&s.custom.backgroundColor?s.custom.backgroundColor:this.getDataset().backgroundColor||this.chart.options.elements.line.backgroundColor,borderWidth:s.custom&&s.custom.borderWidth?s.custom.borderWidth:this.getDataset().borderWidth||this.chart.options.elements.line.borderWidth,borderColor:s.custom&&s.custom.borderColor?s.custom.borderColor:this.getDataset().borderColor||this.chart.options.elements.line.borderColor,borderCapStyle:s.custom&&s.custom.borderCapStyle?s.custom.borderCapStyle:this.getDataset().borderCapStyle||this.chart.options.elements.line.borderCapStyle,borderDash:s.custom&&s.custom.borderDash?s.custom.borderDash:this.getDataset().borderDash||this.chart.options.elements.line.borderDash,borderDashOffset:s.custom&&s.custom.borderDashOffset?s.custom.borderDashOffset:this.getDataset().borderDashOffset||this.chart.options.elements.line.borderDashOffset,borderJoinStyle:s.custom&&s.custom.borderJoinStyle?s.custom.borderJoinStyle:this.getDataset().borderJoinStyle||this.chart.options.elements.line.borderJoinStyle,fill:s.custom&&s.custom.fill?s.custom.fill:void 0!==this.getDataset().fill?this.getDataset().fill:this.chart.options.elements.line.fill,scaleTop:o.top,scaleBottom:o.bottom,scaleZero:i},s.pivot()),e.each(a,function(e,i){this.updateElement(e,i,t)},this),this.chart.options.showLines&&0!==this.chart.options.elements.line.tension&&this.updateBezierControlPoints()},getPointBackgroundColor:function(t,i){var s=this.chart.options.elements.point.backgroundColor,a=this.getDataset();return t.custom&&t.custom.backgroundColor?s=t.custom.backgroundColor:a.pointBackgroundColor?s=e.getValueAtIndexOrDefault(a.pointBackgroundColor,i,s):a.backgroundColor&&(s=a.backgroundColor),s},getPointBorderColor:function(t,i){var s=this.chart.options.elements.point.borderColor,a=this.getDataset();return t.custom&&t.custom.borderColor?s=t.custom.borderColor:a.pointBorderColor?s=e.getValueAtIndexOrDefault(this.getDataset().pointBorderColor,i,s):a.borderColor&&(s=a.borderColor),s},getPointBorderWidth:function(t,i){var s=this.chart.options.elements.point.borderWidth,a=this.getDataset();return t.custom&&void 0!==t.custom.borderWidth?s=t.custom.borderWidth:void 0!==a.pointBorderWidth?s=e.getValueAtIndexOrDefault(a.pointBorderWidth,i,s):void 0!==a.borderWidth&&(s=a.borderWidth),s},updateElement:function(t,i,s){var a,o=this.getScaleForId(this.getDataset().yAxisID),n=this.getScaleForId(this.getDataset().xAxisID);a=o.min<0&&o.max<0?o.getPixelForValue(o.max):o.min>0&&o.max>0?o.getPixelForValue(o.min):o.getPixelForValue(0),t._chart=this.chart.chart,t._xScale=n,t._yScale=o,t._datasetIndex=this.index,t._index=i,t._model={x:n.getPixelForValue(this.getDataset().data[i],i,this.index,this.chart.isCombo),y:s?a:this.calculatePointY(this.getDataset().data[i],i,this.index,this.chart.isCombo),tension:t.custom&&t.custom.tension?t.custom.tension:e.getValueOrDefault(this.getDataset().tension,this.chart.options.elements.line.tension),radius:t.custom&&t.custom.radius?t.custom.radius:e.getValueAtIndexOrDefault(this.getDataset().radius,i,this.chart.options.elements.point.radius),pointStyle:t.custom&&t.custom.pointStyle?t.custom.pointStyle:e.getValueAtIndexOrDefault(this.getDataset().pointStyle,i,this.chart.options.elements.point.pointStyle),backgroundColor:this.getPointBackgroundColor(t,i),borderColor:this.getPointBorderColor(t,i),borderWidth:this.getPointBorderWidth(t,i),hitRadius:t.custom&&t.custom.hitRadius?t.custom.hitRadius:e.getValueAtIndexOrDefault(this.getDataset().hitRadius,i,this.chart.options.elements.point.hitRadius)},t._model.skip=t.custom&&t.custom.skip?t.custom.skip:isNaN(t._model.x)||isNaN(t._model.y)},calculatePointY:function(t,i,s,a){var o=(this.getScaleForId(this.getDataset().xAxisID),this.getScaleForId(this.getDataset().yAxisID));if(o.options.stacked){for(var n=0,r=0,l=0;s>l;l++){var h=this.chart.data.datasets[l];"line"===h.type&&e.isDatasetVisible(h)&&(h.data[i]<0?r+=h.data[i]||0:n+=h.data[i]||0)}return 0>t?o.getPixelForValue(r+t):o.getPixelForValue(n+t)}return o.getPixelForValue(t)},updateBezierControlPoints:function(){e.each(this.getDataset().metaData,function(t,i){var s=e.splineCurve(e.previousItem(this.getDataset().metaData,i)._model,t._model,e.nextItem(this.getDataset().metaData,i)._model,t._model.tension);t._model.controlPointPreviousX=Math.max(Math.min(s.previous.x,this.chart.chartArea.right),this.chart.chartArea.left),t._model.controlPointPreviousY=Math.max(Math.min(s.previous.y,this.chart.chartArea.bottom),this.chart.chartArea.top),t._model.controlPointNextX=Math.max(Math.min(s.next.x,this.chart.chartArea.right),this.chart.chartArea.left),t._model.controlPointNextY=Math.max(Math.min(s.next.y,this.chart.chartArea.bottom),this.chart.chartArea.top),t.pivot()},this)},draw:function(t){var i=t||1;e.each(this.getDataset().metaData,function(t){t.transition(i)}),this.chart.options.showLines&&this.getDataset().metaDataset.transition(i).draw(),e.each(this.getDataset().metaData,function(t){t.draw()})},setHoverStyle:function(t){var i=this.chart.data.datasets[t._datasetIndex],s=t._index;t._model.radius=t.custom&&t.custom.hoverRadius?t.custom.hoverRadius:e.getValueAtIndexOrDefault(i.pointHoverRadius,s,this.chart.options.elements.point.hoverRadius),t._model.backgroundColor=t.custom&&t.custom.hoverBackgroundColor?t.custom.hoverBackgroundColor:e.getValueAtIndexOrDefault(i.pointHoverBackgroundColor,s,e.color(t._model.backgroundColor).saturate(.5).darken(.1).rgbString()),t._model.borderColor=t.custom&&t.custom.hoverBorderColor?t.custom.hoverBorderColor:e.getValueAtIndexOrDefault(i.pointHoverBorderColor,s,e.color(t._model.borderColor).saturate(.5).darken(.1).rgbString()),t._model.borderWidth=t.custom&&t.custom.hoverBorderWidth?t.custom.hoverBorderWidth:e.getValueAtIndexOrDefault(i.pointHoverBorderWidth,s,t._model.borderWidth)},removeHoverStyle:function(t){var i=(this.chart.data.datasets[t._datasetIndex],t._index);t._model.radius=t.custom&&t.custom.radius?t.custom.radius:e.getValueAtIndexOrDefault(this.getDataset().radius,i,this.chart.options.elements.point.radius),t._model.backgroundColor=this.getPointBackgroundColor(t,i),t._model.borderColor=this.getPointBorderColor(t,i),t._model.borderWidth=this.getPointBorderWidth(t,i)}})}},{}],19:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.polarArea={scale:{type:"radialLinear",lineArc:!0},animateRotate:!0,animateScale:!0,aspectRatio:1,legendCallback:function(t){var e=[];if(e.push('
    '),t.data.datasets.length)for(var i=0;i'),t.data.labels[i]&&e.push(t.data.labels[i]),e.push("");return e.push("
"),e.join("")},legend:{labels:{generateLabels:function(t){return t.labels.length&&t.datasets.length?t.labels.map(function(e,i){return{text:e,fillStyle:t.datasets[0].backgroundColor[i],hidden:isNaN(t.datasets[0].data[i]),index:i}}):[]}},onClick:function(t,i){e.each(this.chart.data.datasets,function(t){t.metaHiddenData=t.metaHiddenData||[];var e=i.index;isNaN(t.data[e])?isNaN(t.metaHiddenData[e])||(t.data[e]=t.metaHiddenData[e]):(t.metaHiddenData[e]=t.data[e],t.data[e]=NaN)}),this.chart.update()}},tooltips:{callbacks:{title:function(){return""},label:function(t,e){return e.labels[t.index]+": "+t.yLabel}}}},t.controllers.polarArea=t.DatasetController.extend({linkScales:function(){},addElements:function(){this.getDataset().metaData=this.getDataset().metaData||[],e.each(this.getDataset().data,function(e,i){this.getDataset().metaData[i]=this.getDataset().metaData[i]||new t.elements.Arc({_chart:this.chart.chart,_datasetIndex:this.index,_index:i})},this)},addElementAndReset:function(e){this.getDataset().metaData=this.getDataset().metaData||[];var i=new t.elements.Arc({_chart:this.chart.chart,_datasetIndex:this.index,_index:e});this.updateElement(i,e,!0),this.getDataset().metaData.splice(e,0,i)},getVisibleDatasetCount:function(){return e.where(this.chart.data.datasets,function(t){return e.isDatasetVisible(t)}).length},update:function(t){var i=Math.min(this.chart.chartArea.right-this.chart.chartArea.left,this.chart.chartArea.bottom-this.chart.chartArea.top);this.chart.outerRadius=Math.max((i-this.chart.options.elements.arc.borderWidth/2)/2,0),this.chart.innerRadius=Math.max(this.chart.options.cutoutPercentage?this.chart.outerRadius/100*this.chart.options.cutoutPercentage:1,0),this.chart.radiusLength=(this.chart.outerRadius-this.chart.innerRadius)/this.getVisibleDatasetCount(),this.getDataset().total=0,e.each(this.getDataset().data,function(t){this.getDataset().total+=Math.abs(t)},this),this.outerRadius=this.chart.outerRadius-this.chart.radiusLength*this.index,this.innerRadius=this.outerRadius-this.chart.radiusLength,e.each(this.getDataset().metaData,function(e,i){this.updateElement(e,i,t)},this)},updateElement:function(t,i,s){for(var a=this.calculateCircumference(this.getDataset().data[i]),o=(this.chart.chartArea.left+this.chart.chartArea.right)/2,n=(this.chart.chartArea.top+this.chart.chartArea.bottom)/2,r=0,l=0;i>l;++l)isNaN(this.getDataset().data[l])||++r;var h=-.5*Math.PI+a*r,c=h+a,u={x:o,y:n,innerRadius:0,outerRadius:this.chart.options.animateScale?0:this.chart.scale.getDistanceFromCenterForValue(this.getDataset().data[i]),startAngle:this.chart.options.animateRotate?Math.PI*-.5:h,endAngle:this.chart.options.animateRotate?Math.PI*-.5:c,backgroundColor:t.custom&&t.custom.backgroundColor?t.custom.backgroundColor:e.getValueAtIndexOrDefault(this.getDataset().backgroundColor,i,this.chart.options.elements.arc.backgroundColor),borderWidth:t.custom&&t.custom.borderWidth?t.custom.borderWidth:e.getValueAtIndexOrDefault(this.getDataset().borderWidth,i,this.chart.options.elements.arc.borderWidth),borderColor:t.custom&&t.custom.borderColor?t.custom.borderColor:e.getValueAtIndexOrDefault(this.getDataset().borderColor,i,this.chart.options.elements.arc.borderColor),label:e.getValueAtIndexOrDefault(this.chart.data.labels,i,this.chart.data.labels[i])};e.extend(t,{_chart:this.chart.chart,_datasetIndex:this.index,_index:i,_scale:this.chart.scale,_model:s?u:{x:o,y:n,innerRadius:0, -outerRadius:this.chart.scale.getDistanceFromCenterForValue(this.getDataset().data[i]),startAngle:h,endAngle:c,backgroundColor:t.custom&&t.custom.backgroundColor?t.custom.backgroundColor:e.getValueAtIndexOrDefault(this.getDataset().backgroundColor,i,this.chart.options.elements.arc.backgroundColor),borderWidth:t.custom&&t.custom.borderWidth?t.custom.borderWidth:e.getValueAtIndexOrDefault(this.getDataset().borderWidth,i,this.chart.options.elements.arc.borderWidth),borderColor:t.custom&&t.custom.borderColor?t.custom.borderColor:e.getValueAtIndexOrDefault(this.getDataset().borderColor,i,this.chart.options.elements.arc.borderColor),label:e.getValueAtIndexOrDefault(this.chart.data.labels,i,this.chart.data.labels[i])}}),t.pivot()},draw:function(t){var i=t||1;e.each(this.getDataset().metaData,function(t,e){t.transition(i).draw()})},setHoverStyle:function(t){var i=this.chart.data.datasets[t._datasetIndex],s=t._index;t._model.backgroundColor=t.custom&&t.custom.hoverBackgroundColor?t.custom.hoverBackgroundColor:e.getValueAtIndexOrDefault(i.hoverBackgroundColor,s,e.color(t._model.backgroundColor).saturate(.5).darken(.1).rgbString()),t._model.borderColor=t.custom&&t.custom.hoverBorderColor?t.custom.hoverBorderColor:e.getValueAtIndexOrDefault(i.hoverBorderColor,s,e.color(t._model.borderColor).saturate(.5).darken(.1).rgbString()),t._model.borderWidth=t.custom&&t.custom.hoverBorderWidth?t.custom.hoverBorderWidth:e.getValueAtIndexOrDefault(i.hoverBorderWidth,s,t._model.borderWidth)},removeHoverStyle:function(t){var i=(this.chart.data.datasets[t._datasetIndex],t._index);t._model.backgroundColor=t.custom&&t.custom.backgroundColor?t.custom.backgroundColor:e.getValueAtIndexOrDefault(this.getDataset().backgroundColor,i,this.chart.options.elements.arc.backgroundColor),t._model.borderColor=t.custom&&t.custom.borderColor?t.custom.borderColor:e.getValueAtIndexOrDefault(this.getDataset().borderColor,i,this.chart.options.elements.arc.borderColor),t._model.borderWidth=t.custom&&t.custom.borderWidth?t.custom.borderWidth:e.getValueAtIndexOrDefault(this.getDataset().borderWidth,i,this.chart.options.elements.arc.borderWidth)},calculateCircumference:function(t){if(isNaN(t))return 0;var i=e.where(this.getDataset().data,function(t){return isNaN(t)}).length;return 2*Math.PI/(this.getDataset().data.length-i)}})}},{}],20:[function(t,e,i){"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({linkScales:function(){},addElements:function(){this.getDataset().metaData=this.getDataset().metaData||[],this.getDataset().metaDataset=this.getDataset().metaDataset||new t.elements.Line({_chart:this.chart.chart,_datasetIndex:this.index,_points:this.getDataset().metaData,_loop:!0}),e.each(this.getDataset().data,function(e,i){this.getDataset().metaData[i]=this.getDataset().metaData[i]||new t.elements.Point({_chart:this.chart.chart,_datasetIndex:this.index,_index:i,_model:{x:0,y:0}})},this)},addElementAndReset:function(e){this.getDataset().metaData=this.getDataset().metaData||[];var i=new t.elements.Point({_chart:this.chart.chart,_datasetIndex:this.index,_index:e});this.updateElement(i,e,!0),this.getDataset().metaData.splice(e,0,i),this.updateBezierControlPoints()},update:function(t){var i,s=this.getDataset().metaDataset,a=this.getDataset().metaData,o=this.chart.scale;i=o.min<0&&o.max<0?o.getPointPositionForValue(0,o.max):o.min>0&&o.max>0?o.getPointPositionForValue(0,o.min):o.getPointPositionForValue(0,0),e.extend(this.getDataset().metaDataset,{_datasetIndex:this.index,_children:this.getDataset().metaData,_model:{tension:s.custom&&s.custom.tension?s.custom.tension:e.getValueOrDefault(this.getDataset().tension,this.chart.options.elements.line.tension),backgroundColor:s.custom&&s.custom.backgroundColor?s.custom.backgroundColor:this.getDataset().backgroundColor||this.chart.options.elements.line.backgroundColor,borderWidth:s.custom&&s.custom.borderWidth?s.custom.borderWidth:this.getDataset().borderWidth||this.chart.options.elements.line.borderWidth,borderColor:s.custom&&s.custom.borderColor?s.custom.borderColor:this.getDataset().borderColor||this.chart.options.elements.line.borderColor,fill:s.custom&&s.custom.fill?s.custom.fill:void 0!==this.getDataset().fill?this.getDataset().fill:this.chart.options.elements.line.fill,borderCapStyle:s.custom&&s.custom.borderCapStyle?s.custom.borderCapStyle:this.getDataset().borderCapStyle||this.chart.options.elements.line.borderCapStyle,borderDash:s.custom&&s.custom.borderDash?s.custom.borderDash:this.getDataset().borderDash||this.chart.options.elements.line.borderDash,borderDashOffset:s.custom&&s.custom.borderDashOffset?s.custom.borderDashOffset:this.getDataset().borderDashOffset||this.chart.options.elements.line.borderDashOffset,borderJoinStyle:s.custom&&s.custom.borderJoinStyle?s.custom.borderJoinStyle:this.getDataset().borderJoinStyle||this.chart.options.elements.line.borderJoinStyle,scaleTop:o.top,scaleBottom:o.bottom,scaleZero:i}}),this.getDataset().metaDataset.pivot(),e.each(a,function(e,i){this.updateElement(e,i,t)},this),this.updateBezierControlPoints()},updateElement:function(t,i,s){var a=this.chart.scale.getPointPositionForValue(i,this.getDataset().data[i]);e.extend(t,{_datasetIndex:this.index,_index:i,_scale:this.chart.scale,_model:{x:s?this.chart.scale.xCenter:a.x,y:s?this.chart.scale.yCenter:a.y,tension:t.custom&&t.custom.tension?t.custom.tension:e.getValueOrDefault(this.getDataset().tension,this.chart.options.elements.line.tension),radius:t.custom&&t.custom.radius?t.custom.radius:e.getValueAtIndexOrDefault(this.getDataset().pointRadius,i,this.chart.options.elements.point.radius),backgroundColor:t.custom&&t.custom.backgroundColor?t.custom.backgroundColor:e.getValueAtIndexOrDefault(this.getDataset().pointBackgroundColor,i,this.chart.options.elements.point.backgroundColor),borderColor:t.custom&&t.custom.borderColor?t.custom.borderColor:e.getValueAtIndexOrDefault(this.getDataset().pointBorderColor,i,this.chart.options.elements.point.borderColor),borderWidth:t.custom&&t.custom.borderWidth?t.custom.borderWidth:e.getValueAtIndexOrDefault(this.getDataset().pointBorderWidth,i,this.chart.options.elements.point.borderWidth),pointStyle:t.custom&&t.custom.pointStyle?t.custom.pointStyle:e.getValueAtIndexOrDefault(this.getDataset().pointStyle,i,this.chart.options.elements.point.pointStyle),hitRadius:t.custom&&t.custom.hitRadius?t.custom.hitRadius:e.getValueAtIndexOrDefault(this.getDataset().hitRadius,i,this.chart.options.elements.point.hitRadius)}}),t._model.skip=t.custom&&t.custom.skip?t.custom.skip:isNaN(t._model.x)||isNaN(t._model.y)},updateBezierControlPoints:function(){e.each(this.getDataset().metaData,function(t,i){var s=e.splineCurve(e.previousItem(this.getDataset().metaData,i,!0)._model,t._model,e.nextItem(this.getDataset().metaData,i,!0)._model,t._model.tension);t._model.controlPointPreviousX=Math.max(Math.min(s.previous.x,this.chart.chartArea.right),this.chart.chartArea.left),t._model.controlPointPreviousY=Math.max(Math.min(s.previous.y,this.chart.chartArea.bottom),this.chart.chartArea.top),t._model.controlPointNextX=Math.max(Math.min(s.next.x,this.chart.chartArea.right),this.chart.chartArea.left),t._model.controlPointNextY=Math.max(Math.min(s.next.y,this.chart.chartArea.bottom),this.chart.chartArea.top),t.pivot()},this)},draw:function(t){var i=t||1;e.each(this.getDataset().metaData,function(t,e){t.transition(i)}),this.getDataset().metaDataset.transition(i).draw(),e.each(this.getDataset().metaData,function(t){t.draw()})},setHoverStyle:function(t){var i=this.chart.data.datasets[t._datasetIndex],s=t._index;t._model.radius=t.custom&&t.custom.hoverRadius?t.custom.hoverRadius:e.getValueAtIndexOrDefault(i.pointHoverRadius,s,this.chart.options.elements.point.hoverRadius),t._model.backgroundColor=t.custom&&t.custom.hoverBackgroundColor?t.custom.hoverBackgroundColor:e.getValueAtIndexOrDefault(i.pointHoverBackgroundColor,s,e.color(t._model.backgroundColor).saturate(.5).darken(.1).rgbString()),t._model.borderColor=t.custom&&t.custom.hoverBorderColor?t.custom.hoverBorderColor:e.getValueAtIndexOrDefault(i.pointHoverBorderColor,s,e.color(t._model.borderColor).saturate(.5).darken(.1).rgbString()),t._model.borderWidth=t.custom&&t.custom.hoverBorderWidth?t.custom.hoverBorderWidth:e.getValueAtIndexOrDefault(i.pointHoverBorderWidth,s,t._model.borderWidth)},removeHoverStyle:function(t){var i=(this.chart.data.datasets[t._datasetIndex],t._index);t._model.radius=t.custom&&t.custom.radius?t.custom.radius:e.getValueAtIndexOrDefault(this.getDataset().radius,i,this.chart.options.elements.point.radius),t._model.backgroundColor=t.custom&&t.custom.backgroundColor?t.custom.backgroundColor:e.getValueAtIndexOrDefault(this.getDataset().pointBackgroundColor,i,this.chart.options.elements.point.backgroundColor),t._model.borderColor=t.custom&&t.custom.borderColor?t.custom.borderColor:e.getValueAtIndexOrDefault(this.getDataset().pointBorderColor,i,this.chart.options.elements.point.borderColor),t._model.borderWidth=t.custom&&t.custom.borderWidth?t.custom.borderWidth:e.getValueAtIndexOrDefault(this.getDataset().pointBorderWidth,i,this.chart.options.elements.point.borderWidth)}})}},{}],21:[function(t,e,i){"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,addAnimation:function(t,i,s,a){a||(t.animating=!0);for(var o=0;o1&&(i=Math.floor(this.dropFrames),this.dropFrames=this.dropFrames%1);for(var s=0;sthis.animations[s].animationObject.numSteps&&(this.animations[s].animationObject.currentStep=this.animations[s].animationObject.numSteps),this.animations[s].animationObject.render(this.animations[s].chartInstance,this.animations[s].animationObject),this.animations[s].animationObject.onAnimationProgress&&this.animations[s].animationObject.onAnimationProgress.call&&this.animations[s].animationObject.onAnimationProgress.call(this.animations[s].chartInstance,this.animations[s]),this.animations[s].animationObject.currentStep===this.animations[s].animationObject.numSteps?(this.animations[s].animationObject.onAnimationComplete&&this.animations[s].animationObject.onAnimationComplete.call&&this.animations[s].animationObject.onAnimationComplete.call(this.animations[s].chartInstance,this.animations[s]),this.animations[s].chartInstance.animating=!1,this.animations.splice(s,1)):++s;var a=Date.now(),o=(a-t)/this.frameDuration;this.dropFrames+=o,this.animations.length>0&&e.requestAnimFrame.call(window,this.digestWrapper)}}}},{}],22:[function(t,e,i){"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(){return this.bindEvents(),this.ensureScalesHaveIDs(),this.buildOrUpdateControllers(),this.buildScales(),this.buildSurroundingItems(),this.updateLayout(),this.resetElements(),this.initToolTip(),this.update(),this},clear:function(){return e.clear(this.chart),this},stop:function(){return t.animationService.cancelAnimation(this),this},resize:function(t){var i=this.chart.canvas,s=e.getMaximumWidth(this.chart.canvas),a=this.options.maintainAspectRatio&&isNaN(this.chart.aspectRatio)===!1&&isFinite(this.chart.aspectRatio)&&0!==this.chart.aspectRatio?s/this.chart.aspectRatio:e.getMaximumHeight(this.chart.canvas),o=this.chart.width!==s||this.chart.height!==a;return o?(i.width=this.chart.width=s,i.height=this.chart.height=a,e.retinaScale(this.chart),t||(this.stop(),this.update(this.options.responsiveAnimationDuration)),this):this},ensureScalesHaveIDs:function(){var t="x-axis-",i="y-axis-";this.options.scales&&(this.options.scales.xAxes&&this.options.scales.xAxes.length&&e.each(this.options.scales.xAxes,function(e,i){e.id=e.id||t+i}),this.options.scales.yAxes&&this.options.scales.yAxes.length&&e.each(this.options.scales.yAxes,function(t,e){t.id=t.id||i+e}))},buildScales:function(){if(this.scales={},this.options.scales&&(this.options.scales.xAxes&&this.options.scales.xAxes.length&&e.each(this.options.scales.xAxes,function(i,s){var a=e.getValueOrDefault(i.type,"category"),o=t.scaleService.getScaleConstructor(a);if(o){var n=new o({ctx:this.chart.ctx,options:i,chart:this,id:i.id});this.scales[n.id]=n}},this),this.options.scales.yAxes&&this.options.scales.yAxes.length&&e.each(this.options.scales.yAxes,function(i,s){var a=e.getValueOrDefault(i.type,"linear"),o=t.scaleService.getScaleConstructor(a);if(o){var n=new o({ctx:this.chart.ctx,options:i,chart:this,id:i.id});this.scales[n.id]=n}},this)),this.options.scale){var i=t.scaleService.getScaleConstructor(this.options.scale.type);if(i){var s=new i({ctx:this.chart.ctx,options:this.options.scale,chart:this});this.scale=s,this.scales.radialScale=s}}t.scaleService.addScalesToLayout(this)},buildSurroundingItems:function(){this.options.title&&(this.titleBlock=new t.Title({ctx:this.chart.ctx,options:this.options.title,chart:this}),t.layoutService.addBox(this,this.titleBlock)),this.options.legend&&(this.legend=new t.Legend({ctx:this.chart.ctx,options:this.options.legend,chart:this}),t.layoutService.addBox(this,this.legend))},updateLayout:function(){t.layoutService.update(this,this.chart.width,this.chart.height)},buildOrUpdateControllers:function(){var i=[],s=[];if(e.each(this.data.datasets,function(e,a){e.type||(e.type=this.config.type);var o=e.type;i.push(o),e.controller?e.controller.updateIndex(a):(e.controller=new t.controllers[o](this,a),s.push(e.controller))},this),i.length>1)for(var a=1;a0&&(e=this.data.datasets[e[0]._datasetIndex].metaData),e},generateLegend:function(){return this.options.legendCallback(this)},destroy:function(){this.clear(),e.unbindEvents(this,this.events),e.removeResizeListener(this.chart.canvas.parentNode);var i=this.chart.canvas;i.width=this.chart.width,i.height=this.chart.height,void 0!==this.chart.originalDevicePixelRatio&&this.chart.ctx.scale(1/this.chart.originalDevicePixelRatio,1/this.chart.originalDevicePixelRatio),i.style.width=this.chart.originalCanvasStyleWidth,i.style.height=this.chart.originalCanvasStyleHeight,delete t.instances[this.id]},toBase64Image:function(){return this.chart.canvas.toDataURL.apply(this.chart.canvas,arguments)},initToolTip:function(){this.tooltip=new t.Tooltip({_chart:this.chart,_chartInstance:this,_data:this.data,_options:this.options},this)},bindEvents:function(){e.bindEvents(this,this.options.events,function(t){this.eventHandler(t)})},eventHandler:function(t){if(this.lastActive=this.lastActive||[],this.lastTooltipActive=this.lastTooltipActive||[],"mouseout"===t.type)this.active=[],this.tooltipActive=[];else{var i=this,s=function(e){switch(e){case"single":return i.getElementAtEvent(t);case"label":return i.getElementsAtEvent(t);case"dataset":return i.getDatasetAtEvent(t);default:return t}};this.active=s(this.options.hover.mode),this.tooltipActive=s(this.options.tooltips.mode)}this.options.hover.onHover&&this.options.hover.onHover.call(this,this.active),("mouseup"===t.type||"click"===t.type)&&(this.options.onClick&&this.options.onClick.call(this,t,this.active),this.legend&&this.legend.handleEvent&&this.legend.handleEvent(t));if(this.lastActive.length)switch(this.options.hover.mode){case"single":this.data.datasets[this.lastActive[0]._datasetIndex].controller.removeHoverStyle(this.lastActive[0],this.lastActive[0]._datasetIndex,this.lastActive[0]._index);break;case"label":case"dataset":for(var a=0;at)this.getDataset().metaData.splice(t,e-t);else if(t>e)for(var i=e;t>i;++i)this.addElementAndReset(i)},addElements:e.noop,addElementAndReset:e.noop,draw:e.noop,removeHoverStyle:e.noop,setHoverStyle:e.noop,update:e.noop}),t.DatasetController.extend=e.inherits}},{}],24:[function(t,e,i){"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(){},pivot:function(){return this._view||(this._view=e.clone(this._model)),this._start=e.clone(this._view),this},transition:function(t){return this._view||(this._view=e.clone(this._model)),1===t?(this._view=this._model,this._start=null,this):(this._start||this.pivot(),e.each(this._model,function(i,s){if("_"!==s[0]&&this._model.hasOwnProperty(s))if(this._view.hasOwnProperty(s))if(i===this._view[s]);else if("string"==typeof i)try{var a=e.color(this._start[s]).mix(e.color(this._model[s]),t);this._view[s]=a.rgbString()}catch(o){this._view[s]=i}else if("number"==typeof i){var n=void 0!==this._start[s]&&isNaN(this._start[s])===!1?this._start[s]:0;this._view[s]=(this._model[s]-n)*t+n}else this._view[s]=i;else"number"!=typeof i||isNaN(this._view[s])?this._view[s]=i:this._view[s]=i*t;else;},this),this)},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}},{}],25:[function(t,e,i){"use strict";var s=t("chartjs-color");e.exports=function(t){function e(t,e,i){var s;return"string"==typeof t?(s=parseInt(t,10),-1!=t.indexOf("%")&&(s=s/100*e.parentNode[i])):s=t,s}function i(t,i,s){var a,o=document.defaultView.getComputedStyle(t)[i],n=document.defaultView.getComputedStyle(t.parentNode)[i],r=null!==o&&"none"!==o,l=null!==n&&"none"!==n;return(r||l)&&(a=Math.min(r?e(o,t,s):Number.POSITIVE_INFINITY,l?e(n,t.parentNode,s):Number.POSITIVE_INFINITY)),a}var a=t.helpers={};a.each=function(t,e,i,s){var o,n;if(a.isArray(t))if(n=t.length,s)for(o=n-1;o>=0;o--)e.call(i,t[o],o);else for(o=0;n>o;o++)e.call(i,t[o],o);else if("object"==typeof t){var r=Object.keys(t);for(n=r.length,o=0;n>o;o++)e.call(i,t[r[o]],r[o])}},a.clone=function(t){var e={};return a.each(t,function(i,s){t.hasOwnProperty(s)&&(a.isArray(i)?e[s]=i.slice(0):"object"==typeof i&&null!==i?e[s]=a.clone(i):e[s]=i)}),e},a.extend=function(t){for(var e=arguments.length,i=[],s=1;e>s;s++)i.push(arguments[s]);return a.each(i,function(e){a.each(e,function(i,s){e.hasOwnProperty(s)&&(t[s]=i)})}),t},a.configMerge=function(e){var i=a.clone(e);return a.each(Array.prototype.slice.call(arguments,1),function(e){a.each(e,function(s,o){if(e.hasOwnProperty(o))if("scales"===o)i[o]=a.scaleMerge(i.hasOwnProperty(o)?i[o]:{},s);else if("scale"===o)i[o]=a.configMerge(i.hasOwnProperty(o)?i[o]:{},t.scaleService.getScaleDefaults(s.type),s);else if(i.hasOwnProperty(o)&&a.isArray(i[o])&&a.isArray(s)){var n=i[o];a.each(s,function(t,e){e=s[o].length||!s[o][i].type?s[o].push(a.configMerge(r,e)):e.type&&e.type!==s[o][i].type?s[o][i]=a.configMerge(s[o][i],r,e):s[o][i]=a.configMerge(s[o][i],e)}):(s[o]=[],a.each(e,function(e){var i=a.getValueOrDefault(e.type,"xAxes"===o?"category":"linear");s[o].push(a.configMerge(t.scaleService.getScaleDefaults(i),e))})):s.hasOwnProperty(o)&&"object"==typeof s[o]&&null!==s[o]&&"object"==typeof e?s[o]=a.configMerge(s[o],e):s[o]=e)}),s},a.getValueAtIndexOrDefault=function(t,e,i){return void 0===t||null===t?i:a.isArray(t)?e=0;s--){var a=t[s];if(e(a))return a}},a.inherits=function(t){var e=this,i=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},s=function(){this.constructor=i};return s.prototype=e.prototype,i.prototype=new s,i.extend=a.inherits,t&&a.extend(i.prototype,t),i.__super__=e.prototype,i},a.noop=function(){},a.uid=function(){var t=0;return function(){return"chart-"+t++}}(),a.warn=function(t){console&&"function"==typeof console.warn&&console.warn(t)},a.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},a.almostEquals=function(t,e,i){return Math.abs(t-e)0?1:-1)},a.log10=function(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10},a.toRadians=function(t){return t*(Math.PI/180)},a.toDegrees=function(t){return t*(180/Math.PI)},a.getAngleFromPoint=function(t,e){var i=e.x-t.x,s=e.y-t.y,a=Math.sqrt(i*i+s*s),o=Math.atan2(s,i);return o<-.5*Math.PI&&(o+=2*Math.PI),{angle:o,distance:a}},a.aliasPixel=function(t){return t%2===0?0:.5},a.splineCurve=function(t,e,i,s){var a=t.skip?e:t,o=e,n=i.skip?e:i,r=Math.sqrt(Math.pow(o.x-a.x,2)+Math.pow(o.y-a.y,2)),l=Math.sqrt(Math.pow(n.x-o.x,2)+Math.pow(n.y-o.y,2)),h=r/(r+l),c=l/(r+l);h=isNaN(h)?0:h,c=isNaN(c)?0:c;var u=s*h,d=s*c;return{previous:{x:o.x-u*(n.x-a.x),y:o.y-u*(n.y-a.y)},next:{x:o.x+d*(n.x-a.x),y:o.y+d*(n.y-a.y)}}},a.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]},a.previousItem=function(t,e,i){return i?0>=e?t[t.length-1]:t[e-1]:0>=e?t[0]:t[e-1]},a.niceNum=function(t,e){var i,s=Math.floor(a.log10(t)),o=t/Math.pow(10,s);return i=e?1.5>o?1:3>o?2:7>o?5:10:1>=o?1:2>=o?2:5>=o?5:10,i*Math.pow(10,s)};var o=a.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:-0.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:-0.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-0.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?-0.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,i=0,s=1;return 0===t?0:1===(t/=1)?1:(i||(i=.3),st?-.5*(s*Math.pow(2,10*(t-=1))*Math.sin((1*t-e)*(2*Math.PI)/i)):s*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-o.easeOutBounce(1-t)},easeOutBounce:function(t){return(t/=1)<1/2.75?1*(7.5625*t*t):2/2.75>t?1*(7.5625*(t-=1.5/2.75)*t+.75):2.5/2.75>t?1*(7.5625*(t-=2.25/2.75)*t+.9375):1*(7.5625*(t-=2.625/2.75)*t+.984375)},easeInOutBounce:function(t){return.5>t?.5*o.easeInBounce(2*t):.5*o.easeOutBounce(2*t-1)+.5}};a.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)}}(),a.cancelAnimFrame=function(){return window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||function(t){return window.clearTimeout(t,1e3/60)}}(),a.getRelativePosition=function(t,e){var i,s,o=t.originalEvent||t,n=t.currentTarget||t.srcElement,r=n.getBoundingClientRect();o.touches&&o.touches.length>0?(i=o.touches[0].clientX,s=o.touches[0].clientY):(i=o.clientX,s=o.clientY);var l=parseFloat(a.getStyle(n,"padding-left")),h=parseFloat(a.getStyle(n,"padding-top")),c=parseFloat(a.getStyle(n,"padding-right")),u=parseFloat(a.getStyle(n,"padding-bottom")),d=r.right-r.left-l-c,f=r.bottom-r.top-h-u;return i=Math.round((i-r.left-l)/d*n.width/e.currentDevicePixelRatio),s=Math.round((s-r.top-h)/f*n.height/e.currentDevicePixelRatio),{x:i,y:s}},a.addEvent=function(t,e,i){t.addEventListener?t.addEventListener(e,i):t.attachEvent?t.attachEvent("on"+e,i):t["on"+e]=i; -},a.removeEvent=function(t,e,i){t.removeEventListener?t.removeEventListener(e,i,!1):t.detachEvent?t.detachEvent("on"+e,i):t["on"+e]=a.noop},a.bindEvents=function(t,e,i){t.events||(t.events={}),a.each(e,function(e){t.events[e]=function(){i.apply(t,arguments)},a.addEvent(t.chart.canvas,e,t.events[e])})},a.unbindEvents=function(t,e){a.each(e,function(e,i){a.removeEvent(t.chart.canvas,i,e)})},a.getConstraintWidth=function(t){return i(t,"max-width","clientWidth")},a.getConstraintHeight=function(t){return i(t,"max-height","clientHeight")},a.getMaximumWidth=function(t){var e=t.parentNode,i=parseInt(a.getStyle(e,"padding-left"))+parseInt(a.getStyle(e,"padding-right")),s=e.clientWidth-i,o=a.getConstraintWidth(t);return void 0!==o&&(s=Math.min(s,o)),s},a.getMaximumHeight=function(t){var e=t.parentNode,i=parseInt(a.getStyle(e,"padding-top"))+parseInt(a.getStyle(e,"padding-bottom")),s=e.clientHeight-i,o=a.getConstraintHeight(t);return void 0!==o&&(s=Math.min(s,o)),s},a.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},a.retinaScale=function(t){var e=t.ctx,i=t.canvas.width,s=t.canvas.height,a=t.currentDevicePixelRatio=window.devicePixelRatio||1;1!==a&&(e.canvas.height=s*a,e.canvas.width=i*a,e.scale(a,a),t.originalDevicePixelRatio=t.originalDevicePixelRatio||a),e.canvas.style.width=i+"px",e.canvas.style.height=s+"px"},a.clear=function(t){t.ctx.clearRect(0,0,t.width,t.height)},a.fontString=function(t,e,i){return e+" "+t+"px "+i},a.longestText=function(t,e,i,s){s=s||{},s.data=s.data||{},s.garbageCollect=s.garbageCollect||[],s.font!==e&&(s.data={},s.garbageCollect=[],s.font=e),t.font=e;var o=0;a.each(i,function(e){var i=s.data[e];i||(i=s.data[e]=t.measureText(e).width,s.garbageCollect.push(e)),i>o&&(o=i)});var n=s.garbageCollect.length/2;if(n>i.length){for(var r=0;n>r;r++)delete s.data[s.garbageCollect[r]];s.garbageCollect.splice(0,n)}return o},a.drawRoundedRectangle=function(t,e,i,s,a,o){t.beginPath(),t.moveTo(e+o,i),t.lineTo(e+s-o,i),t.quadraticCurveTo(e+s,i,e+s,i+o),t.lineTo(e+s,i+a-o),t.quadraticCurveTo(e+s,i+a,e+s-o,i+a),t.lineTo(e+o,i+a),t.quadraticCurveTo(e,i+a,e,i+a-o),t.lineTo(e,i+o),t.quadraticCurveTo(e,i,e+o,i),t.closePath()},a.color=function(t){return s?s(t):(console.log("Color.js not found!"),t)},a.addResizeListener=function(t,e){var i=document.createElement("iframe"),s="chartjs-hidden-iframe";i.classlist?i.classlist.add(s):i.setAttribute("class",s),i.style.width="100%",i.style.display="block",i.style.border=0,i.style.height=0,i.style.margin=0,i.style.position="absolute",i.style.left=0,i.style.right=0,i.style.top=0,i.style.bottom=0,t.insertBefore(i,t.firstChild),(i.contentWindow||i).onresize=function(){e&&e()}},a.removeResizeListener=function(t){var e=t.querySelector(".chartjs-hidden-iframe");e&&e.parentNode.removeChild(e)},a.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===Object.prototype.toString.call(t)},a.pushAllIfDefined=function(t,e){"undefined"!=typeof t&&(a.isArray(t)?e.push.apply(e,t):e.push(t))},a.isDatasetVisible=function(t){return!t.hidden},a.callCallback=function(t,e,i){t&&"function"==typeof t.call&&t.apply(i,e)}}},{"chartjs-color":4}],26:[function(t,e,i){"use strict";e.exports=function(){var t=function(e,i){this.config=i,e.length&&e[0].getContext&&(e=e[0]),e.getContext&&(e=e.getContext("2d")),this.ctx=e,this.canvas=e.canvas,this.width=e.canvas.width||parseInt(t.helpers.getStyle(e.canvas,"width"))||t.helpers.getMaximumWidth(e.canvas),this.height=e.canvas.height||parseInt(t.helpers.getStyle(e.canvas,"height"))||t.helpers.getMaximumHeight(e.canvas),this.aspectRatio=this.width/this.height,(isNaN(this.aspectRatio)||isFinite(this.aspectRatio)===!1)&&(this.aspectRatio=void 0!==i.aspectRatio?i.aspectRatio:2),this.originalCanvasStyleWidth=e.canvas.style.width,this.originalCanvasStyleHeight=e.canvas.style.height,t.helpers.retinaScale(this),i&&(this.controller=new t.Controller(this));var s=this;return t.helpers.addResizeListener(e.canvas.parentNode,function(){s.controller&&s.controller.config.options.responsive&&s.controller.resize()}),this.controller?this.controller:this};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('
    ');for(var i=0;i'),t.data.datasets[i].label&&e.push(t.data.datasets[i].label),e.push("");return e.push("
"),e.join("")}}},t}},{}],27:[function(t,e,i){"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,s){function a(t){var e,i=t.isHorizontal();i?(e=t.update(t.options.fullWidth?g:_,y),k-=e.height):(e=t.update(x,v),_-=e.width),D.push({horizontal:i,minSize:e,box:t})}function o(t){var i=e.findNextWhere(D,function(e){return e.box===t});if(i)if(t.isHorizontal()){var s={left:S,right:w,top:0,bottom:0};t.update(t.options.fullWidth?g:_,p/2,s)}else t.update(i.minSize.width,k)}function n(t){var i=e.findNextWhere(D,function(e){return e.box===t}),s={left:0,right:0,top:C,bottom:M};i&&t.update(i.minSize.width,k,s)}function r(t){t.isHorizontal()?(t.left=t.options.fullWidth?l:S,t.right=t.options.fullWidth?i-l:S+_,t.top=F,t.bottom=F+t.height,F=t.bottom):(t.left=I,t.right=I+t.width,t.top=C,t.bottom=C+k,I=t.right)}if(t){var l=0,h=0,c=e.where(t.boxes,function(t){return"left"===t.options.position}),u=e.where(t.boxes,function(t){return"right"===t.options.position}),d=e.where(t.boxes,function(t){return"top"===t.options.position}),f=e.where(t.boxes,function(t){return"bottom"===t.options.position}),m=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)}),f.sort(function(t,e){return(t.options.fullWidth?1:0)-(e.options.fullWidth?1:0)});var g=i-2*l,p=s-2*h,b=g/2,v=p/2,x=(i-b)/(c.length+u.length),y=(s-v)/(d.length+f.length),_=g,k=p,D=[];e.each(c.concat(u,d,f),a);var S=l,w=l,C=h,M=h;e.each(c.concat(u),o),e.each(c,function(t){S+=t.width}),e.each(u,function(t){w+=t.width}),e.each(d.concat(f),o),e.each(d,function(t){C+=t.height}),e.each(f,function(t){M+=t.height}),e.each(c.concat(u),n),S=l,w=l,C=h,M=h,e.each(c,function(t){S+=t.width}),e.each(u,function(t){w+=t.width}),e.each(d,function(t){C+=t.height}),e.each(f,function(t){M+=t.height});var A=s-C-M,T=i-S-w;(T!==_||A!==k)&&(e.each(c,function(t){t.height=A}),e.each(u,function(t){t.height=A}),e.each(d,function(t){t.width=T}),e.each(f,function(t){t.width=T}),k=A,_=T);var I=l,F=h;e.each(c.concat(d),r),I+=_,F+=k,e.each(u,r),e.each(f,r),t.chartArea={left:S,top:C,right:S+_,bottom:C+k},e.each(m,function(e){e.left=t.chartArea.left,e.top=t.chartArea.top,e.right=t.chartArea.right,e.bottom=t.chartArea.bottom,e.update(_,k)})}}}}},{}],28:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.global.legend={display:!0,position:"top",fullWidth:!0,reverse:!1,onClick:function(t,e){var i=this.chart.data.datasets[e.datasetIndex];i.hidden=!i.hidden,this.chart.update()},labels:{boxWidth:40,padding:10,generateLabels:function(t){return e.isArray(t.datasets)?t.datasets.map(function(t,e){return{text:t.label,fillStyle:t.backgroundColor,hidden:t.hidden,lineCap:t.borderCapStyle,lineDash:t.borderDash,lineDashOffset:t.borderDashOffset,lineJoin:t.borderJoinStyle,lineWidth:t.borderWidth,strokeStyle:t.borderColor,datasetIndex:e}},this):[]}}},t.Legend=t.Element.extend({initialize:function(t){e.extend(this,t),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:e.noop,update:function(t,e,i){return this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this.margins=i,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this.beforeBuildLabels(),this.buildLabels(),this.afterBuildLabels(),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate(),this.minSize},afterUpdate:e.noop,beforeSetDimensions:e.noop,setDimensions:function(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0,this.minSize={width:0,height:0}},afterSetDimensions:e.noop,beforeBuildLabels:e.noop,buildLabels:function(){this.legendItems=this.options.labels.generateLabels.call(this,this.chart.data),this.options.reverse&&this.legendItems.reverse()},afterBuildLabels:e.noop,beforeFit:e.noop,fit:function(){var i=this.ctx,s=e.getValueOrDefault(this.options.labels.fontSize,t.defaults.global.defaultFontSize),a=e.getValueOrDefault(this.options.labels.fontStyle,t.defaults.global.defaultFontStyle),o=e.getValueOrDefault(this.options.labels.fontFamily,t.defaults.global.defaultFontFamily),n=e.fontString(s,a,o);if(this.legendHitBoxes=[],this.isHorizontal()?this.minSize.width=this.maxWidth:this.minSize.width=this.options.display?10:0,this.isHorizontal()?this.minSize.height=this.options.display?10:0:this.minSize.height=this.maxHeight,this.options.display&&this.isHorizontal()){this.lineWidths=[0];var r=this.legendItems.length?s+this.options.labels.padding:0;i.textAlign="left",i.textBaseline="top",i.font=n,e.each(this.legendItems,function(t,e){var a=this.options.labels.boxWidth+s/2+i.measureText(t.text).width;this.lineWidths[this.lineWidths.length-1]+a+this.options.labels.padding>=this.width&&(r+=s+this.options.labels.padding,this.lineWidths[this.lineWidths.length]=this.left),this.legendHitBoxes[e]={left:0,top:0,width:a,height:s},this.lineWidths[this.lineWidths.length-1]+=a+this.options.labels.padding},this),this.minSize.height+=r}this.width=this.minSize.width,this.height=this.minSize.height},afterFit:e.noop,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){if(this.options.display){var i=this.ctx,s={x:this.left+(this.width-this.lineWidths[0])/2,y:this.top+this.options.labels.padding,line:0},a=e.getValueOrDefault(this.options.labels.fontColor,t.defaults.global.defaultFontColor),o=e.getValueOrDefault(this.options.labels.fontSize,t.defaults.global.defaultFontSize),n=e.getValueOrDefault(this.options.labels.fontStyle,t.defaults.global.defaultFontStyle),r=e.getValueOrDefault(this.options.labels.fontFamily,t.defaults.global.defaultFontFamily),l=e.fontString(o,n,r);this.isHorizontal()&&(i.textAlign="left",i.textBaseline="top",i.lineWidth=.5,i.strokeStyle=a,i.fillStyle=a,i.font=l,e.each(this.legendItems,function(e,a){var n=i.measureText(e.text).width,r=this.options.labels.boxWidth+o/2+n;s.x+r>=this.width&&(s.y+=o+this.options.labels.padding,s.line++,s.x=this.left+(this.width-this.lineWidths[s.line])/2),i.save();var l=function(t,e){return void 0!==t?t:e};i.fillStyle=l(e.fillStyle,t.defaults.global.defaultColor),i.lineCap=l(e.lineCap,t.defaults.global.elements.line.borderCapStyle),i.lineDashOffset=l(e.lineDashOffset,t.defaults.global.elements.line.borderDashOffset),i.lineJoin=l(e.lineJoin,t.defaults.global.elements.line.borderJoinStyle),i.lineWidth=l(e.lineWidth,t.defaults.global.elements.line.borderWidth),i.strokeStyle=l(e.strokeStyle,t.defaults.global.defaultColor),i.setLineDash&&i.setLineDash(l(e.lineDash,t.defaults.global.elements.line.borderDash)),i.strokeRect(s.x,s.y,this.options.labels.boxWidth,o),i.fillRect(s.x,s.y,this.options.labels.boxWidth,o),i.restore(),this.legendHitBoxes[a].left=s.x,this.legendHitBoxes[a].top=s.y,i.fillText(e.text,this.options.labels.boxWidth+o/2+s.x,s.y),e.hidden&&(i.beginPath(),i.lineWidth=2,i.moveTo(this.options.labels.boxWidth+o/2+s.x,s.y+o/2),i.lineTo(this.options.labels.boxWidth+o/2+s.x+n,s.y+o/2),i.stroke()),s.x+=r+this.options.labels.padding},this))}},handleEvent:function(t){var i=e.getRelativePosition(t,this.chart.chart);if(i.x>=this.left&&i.x<=this.right&&i.y>=this.top&&i.y<=this.bottom)for(var s=0;s=a.left&&i.x<=a.left+a.width&&i.y>=a.top&&i.y<=a.top+a.height){this.options.onClick&&this.options.onClick.call(this,t,this.legendItems[s]);break}}}})}},{}],29:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.scale={display:!0,gridLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1,drawOnChartArea:!0,drawTicks:!0,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",offsetGridLines:!1},scaleLabel:{labelString:"",display:!1},ticks:{beginAtZero:!1,maxRotation:90,mirror:!1,padding:10,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:20,callback:function(t){return""+t}}},t.Scale=t.Element.extend({beforeUpdate:function(){e.callCallback(this.options.beforeUpdate,[this])},update:function(t,i,s){return this.beforeUpdate(),this.maxWidth=t,this.maxHeight=i,this.margins=e.extend({left:0,right:0,top:0,bottom:0},s),this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this.beforeBuildTicks(),this.buildTicks(),this.afterBuildTicks(),this.beforeTickToLabelConversion(),this.convertTicksToLabels(),this.afterTickToLabelConversion(),this.beforeCalculateTickRotation(),this.calculateTickRotation(),this.afterCalculateTickRotation(),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate(),this.minSize},afterUpdate:function(){e.callCallback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){e.callCallback(this.options.beforeSetDimensions,[this])},setDimensions:function(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.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(){this.ticks=this.ticks.map(function(t,e,i){return this.options.ticks.userCallback?this.options.ticks.userCallback(t,e,i):this.options.ticks.callback(t,e,i)},this)},afterTickToLabelConversion:function(){e.callCallback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){e.callCallback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var i=e.getValueOrDefault(this.options.ticks.fontSize,t.defaults.global.defaultFontSize),s=e.getValueOrDefault(this.options.ticks.fontStyle,t.defaults.global.defaultFontStyle),a=e.getValueOrDefault(this.options.ticks.fontFamily,t.defaults.global.defaultFontFamily),o=e.fontString(i,s,a);this.ctx.font=o;var n,r=this.ctx.measureText(this.ticks[0]).width,l=this.ctx.measureText(this.ticks[this.ticks.length-1]).width;if(this.labelRotation=0,this.paddingRight=0,this.paddingLeft=0,this.options.display&&this.isHorizontal()){this.paddingRight=l/2+3,this.paddingLeft=r/2+3,this.longestTextCache||(this.longestTextCache={});for(var h,c,u=e.longestText(this.ctx,o,this.ticks,this.longestTextCache),d=u,f=this.getPixelForTick(1)-this.getPixelForTick(0)-6;d>f&&this.labelRotationthis.yLabelWidth&&(this.paddingLeft=n+i/2),this.paddingRight=i/2,c*u>this.maxHeight){this.labelRotation--;break}this.labelRotation++,d=h*u}}this.margins&&(this.paddingLeft=Math.max(this.paddingLeft-this.margins.left,0),this.paddingRight=Math.max(this.paddingRight-this.margins.right,0))},afterCalculateTickRotation:function(){e.callCallback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){e.callCallback(this.options.beforeFit,[this])},fit:function(){this.minSize={width:0,height:0};var i=e.getValueOrDefault(this.options.ticks.fontSize,t.defaults.global.defaultFontSize),s=e.getValueOrDefault(this.options.ticks.fontStyle,t.defaults.global.defaultFontStyle),a=e.getValueOrDefault(this.options.ticks.fontFamily,t.defaults.global.defaultFontFamily),o=e.fontString(i,s,a),n=e.getValueOrDefault(this.options.scaleLabel.fontSize,t.defaults.global.defaultFontSize),r=e.getValueOrDefault(this.options.scaleLabel.fontStyle,t.defaults.global.defaultFontStyle),l=e.getValueOrDefault(this.options.scaleLabel.fontFamily,t.defaults.global.defaultFontFamily);e.fontString(n,r,l);if(this.isHorizontal()?this.minSize.width=this.isFullWidth()?this.maxWidth-this.margins.left-this.margins.right:this.maxWidth:this.minSize.width=this.options.gridLines.display&&this.options.display?10:0,this.isHorizontal()?this.minSize.height=this.options.gridLines.display&&this.options.display?10:0:this.minSize.height=this.maxHeight,this.options.scaleLabel.display&&(this.isHorizontal()?this.minSize.height+=1.5*n:this.minSize.width+=1.5*n),this.options.ticks.display&&this.options.display){this.longestTextCache||(this.longestTextCache={});var h=e.longestText(this.ctx,o,this.ticks,this.longestTextCache);if(this.isHorizontal()){this.longestLabelWidth=h;var c=Math.sin(e.toRadians(this.labelRotation))*this.longestLabelWidth+1.5*i;this.minSize.height=Math.min(this.maxHeight,this.minSize.height+c),this.ctx.font=o;var u=this.ctx.measureText(this.ticks[0]).width,d=this.ctx.measureText(this.ticks[this.ticks.length-1]).width,f=Math.cos(e.toRadians(this.labelRotation)),m=Math.sin(e.toRadians(this.labelRotation));this.paddingLeft=0!==this.labelRotation?f*u+3:u/2+3,this.paddingRight=0!==this.labelRotation?m*(i/2)+3:d/2+3}else{var g=this.maxWidth-this.minSize.width;this.options.ticks.mirror||(h+=this.options.ticks.padding),g>h?this.minSize.width+=h:this.minSize.width=this.maxWidth,this.paddingTop=i/2,this.paddingBottom=i/2}}this.margins&&(this.paddingLeft=Math.max(this.paddingLeft-this.margins.left,0),this.paddingTop=Math.max(this.paddingTop-this.margins.top,0),this.paddingRight=Math.max(this.paddingRight-this.margins.right,0),this.paddingBottom=Math.max(this.paddingBottom-this.margins.bottom,0)),this.width=this.minSize.width,this.height=this.minSize.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 i(t){return null===t||"undefined"==typeof t?NaN:"number"==typeof t&&isNaN(t)?NaN:"object"==typeof t?t instanceof Date?t:i(this.isHorizontal()?t.x:t.y):t},getLabelForIndex:e.noop,getPixelForValue:e.noop,getPixelForTick:function(t,e){if(this.isHorizontal()){var i=this.width-(this.paddingLeft+this.paddingRight),s=i/Math.max(this.ticks.length-(this.options.gridLines.offsetGridLines?0:1),1),a=s*t+this.paddingLeft;e&&(a+=s/2);var o=this.left+Math.round(a);return o+=this.isFullWidth()?this.margins.left:0}var n=this.height-(this.paddingTop+this.paddingBottom);return this.top+t*(n/(this.ticks.length-1))},getPixelForDecimal:function(t){if(this.isHorizontal()){var e=this.width-(this.paddingLeft+this.paddingRight),i=e*t+this.paddingLeft,s=this.left+Math.round(i);return s+=this.isFullWidth()?this.margins.left:0}return this.top+t*this.height},draw:function(i){if(this.options.display){var s,a,o,n,r,l=0!==this.labelRotation,h=this.options.ticks.autoSkip;this.options.ticks.maxTicksLimit&&(r=this.options.ticks.maxTicksLimit);var c=e.getValueOrDefault(this.options.ticks.fontColor,t.defaults.global.defaultFontColor),u=e.getValueOrDefault(this.options.ticks.fontSize,t.defaults.global.defaultFontSize),d=e.getValueOrDefault(this.options.ticks.fontStyle,t.defaults.global.defaultFontStyle),f=e.getValueOrDefault(this.options.ticks.fontFamily,t.defaults.global.defaultFontFamily),m=e.fontString(u,d,f),g=e.getValueOrDefault(this.options.scaleLabel.fontColor,t.defaults.global.defaultFontColor),p=e.getValueOrDefault(this.options.scaleLabel.fontSize,t.defaults.global.defaultFontSize),b=e.getValueOrDefault(this.options.scaleLabel.fontStyle,t.defaults.global.defaultFontStyle),v=e.getValueOrDefault(this.options.scaleLabel.fontFamily,t.defaults.global.defaultFontFamily),x=e.fontString(p,b,v),y=Math.cos(e.toRadians(this.labelRotation)),_=(Math.sin(e.toRadians(this.labelRotation)),this.longestLabelWidth*y);if(this.ctx.fillStyle=c,this.isHorizontal()){s=!0;var k="bottom"===this.options.position?this.top:this.bottom-10,D="bottom"===this.options.position?this.top+10:this.bottom;if(a=!1,(_/2+this.options.ticks.autoSkipPadding)*this.ticks.length>this.width-(this.paddingLeft+this.paddingRight)&&(a=1+Math.floor((_/2+this.options.ticks.autoSkipPadding)*this.ticks.length/(this.width-(this.paddingLeft+this.paddingRight)))),r&&this.ticks.length>r)for(;!a||this.ticks.length/(a||1)>r;)a||(a=1),a+=1;h||(a=!1),e.each(this.ticks,function(t,o){var n=this.ticks.length===o+1,r=a>1&&o%a>0||o%a===0&&o+a>this.ticks.length;if((!r||n)&&void 0!==t&&null!==t){var h=this.getPixelForTick(o),c=this.getPixelForTick(o,this.options.gridLines.offsetGridLines);this.options.gridLines.display&&(o===("undefined"!=typeof this.zeroLineIndex?this.zeroLineIndex:0)?(this.ctx.lineWidth=this.options.gridLines.zeroLineWidth,this.ctx.strokeStyle=this.options.gridLines.zeroLineColor,s=!0):s&&(this.ctx.lineWidth=this.options.gridLines.lineWidth,this.ctx.strokeStyle=this.options.gridLines.color,s=!1),h+=e.aliasPixel(this.ctx.lineWidth),this.ctx.beginPath(),this.options.gridLines.drawTicks&&(this.ctx.moveTo(h,k),this.ctx.lineTo(h,D)),this.options.gridLines.drawOnChartArea&&(this.ctx.moveTo(h,i.top),this.ctx.lineTo(h,i.bottom)),this.ctx.stroke()),this.options.ticks.display&&(this.ctx.save(),this.ctx.translate(c,l?this.top+12:"top"===this.options.position?this.bottom-10:this.top+10),this.ctx.rotate(-1*e.toRadians(this.labelRotation)),this.ctx.font=m,this.ctx.textAlign=l?"right":"center",this.ctx.textBaseline=l?"middle":"top"===this.options.position?"bottom":"top",this.ctx.fillText(t,0,0),this.ctx.restore())}},this),this.options.scaleLabel.display&&(this.ctx.textAlign="center",this.ctx.textBaseline="middle",this.ctx.fillStyle=g,this.ctx.font=x,o=this.left+(this.right-this.left)/2,n="bottom"===this.options.position?this.bottom-p/2:this.top+p/2,this.ctx.fillText(this.options.scaleLabel.labelString,o,n))}else{s=!0;var S="right"===this.options.position?this.left:this.right-5,w="right"===this.options.position?this.left+5:this.right;if(e.each(this.ticks,function(t,a){if(void 0!==t&&null!==t){var o=this.getPixelForTick(a);if(this.options.gridLines.display&&(a===("undefined"!=typeof this.zeroLineIndex?this.zeroLineIndex:0)?(this.ctx.lineWidth=this.options.gridLines.zeroLineWidth,this.ctx.strokeStyle=this.options.gridLines.zeroLineColor,s=!0):s&&(this.ctx.lineWidth=this.options.gridLines.lineWidth,this.ctx.strokeStyle=this.options.gridLines.color,s=!1),o+=e.aliasPixel(this.ctx.lineWidth),this.ctx.beginPath(),this.options.gridLines.drawTicks&&(this.ctx.moveTo(S,o),this.ctx.lineTo(w,o)),this.options.gridLines.drawOnChartArea&&(this.ctx.moveTo(i.left,o),this.ctx.lineTo(i.right,o)),this.ctx.stroke()),this.options.ticks.display){var n,r=this.getPixelForTick(a,this.options.gridLines.offsetGridLines);this.ctx.save(),"left"===this.options.position?this.options.ticks.mirror?(n=this.right+this.options.ticks.padding,this.ctx.textAlign="left"):(n=this.right-this.options.ticks.padding,this.ctx.textAlign="right"):this.options.ticks.mirror?(n=this.left-this.options.ticks.padding,this.ctx.textAlign="right"):(n=this.left+this.options.ticks.padding,this.ctx.textAlign="left"),this.ctx.translate(n,r),this.ctx.rotate(-1*e.toRadians(this.labelRotation)),this.ctx.font=m,this.ctx.textBaseline="middle",this.ctx.fillText(t,0,0),this.ctx.restore()}}},this),this.options.scaleLabel.display){o="left"===this.options.position?this.left+p/2:this.right-p/2,n=this.top+(this.bottom-this.top)/2;var C="left"===this.options.position?-.5*Math.PI:.5*Math.PI;this.ctx.save(),this.ctx.translate(o,n),this.ctx.rotate(C),this.ctx.textAlign="center",this.ctx.fillStyle=g,this.ctx.font=x,this.ctx.textBaseline="middle",this.ctx.fillText(this.options.scaleLabel.labelString,0,0),this.ctx.restore()}}this.ctx.lineWidth=this.options.gridLines.lineWidth,this.ctx.strokeStyle=this.options.gridLines.color;var M=this.left,A=this.right,T=this.top,I=this.bottom;this.isHorizontal()?(T=I="top"===this.options.position?this.bottom:this.top,T+=e.aliasPixel(this.ctx.lineWidth),I+=e.aliasPixel(this.ctx.lineWidth)):(M=A="left"===this.options.position?this.right:this.left,M+=e.aliasPixel(this.ctx.lineWidth),A+=e.aliasPixel(this.ctx.lineWidth)),this.ctx.beginPath(),this.ctx.moveTo(M,T),this.ctx.lineTo(A,I),this.ctx.stroke()}}})}},{}],30:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.scaleService={constructors:{},defaults:{},registerScaleType:function(t,i,s){this.constructors[t]=i,this.defaults[t]=e.clone(s)},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]):{}},addScalesToLayout:function(i){e.each(i.scales,function(e){t.layoutService.addBox(i,e)})}}}},{}],31:[function(t,e,i){"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:""},t.Title=t.Element.extend({initialize:function(i){e.extend(this,i),this.options=e.configMerge(t.defaults.global.title,i.options),this.legendHitBoxes=[]},beforeUpdate:e.noop,update:function(t,e,i){return this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this.margins=i,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this.beforeBuildLabels(),this.buildLabels(),this.afterBuildLabels(),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate(),this.minSize},afterUpdate:e.noop,beforeSetDimensions:e.noop,setDimensions:function(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0,this.minSize={width:0,height:0}},afterSetDimensions:e.noop,beforeBuildLabels:e.noop,buildLabels:e.noop,afterBuildLabels:e.noop,beforeFit:e.noop,fit:function(){var i=(this.ctx,e.getValueOrDefault(this.options.fontSize,t.defaults.global.defaultFontSize)),s=e.getValueOrDefault(this.options.fontStyle,t.defaults.global.defaultFontStyle),a=e.getValueOrDefault(this.options.fontFamily,t.defaults.global.defaultFontFamily);e.fontString(i,s,a);this.isHorizontal()?this.minSize.width=this.maxWidth:this.minSize.width=0,this.isHorizontal()?this.minSize.height=0:this.minSize.height=this.maxHeight,this.isHorizontal()?this.options.display&&(this.minSize.height+=i+2*this.options.padding):this.options.display&&(this.minSize.width+=i+2*this.options.padding),this.width=this.minSize.width,this.height=this.minSize.height},afterFit:e.noop,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){if(this.options.display){var i,s,a=this.ctx,o=e.getValueOrDefault(this.options.fontColor,t.defaults.global.defaultFontColor),n=e.getValueOrDefault(this.options.fontSize,t.defaults.global.defaultFontSize),r=e.getValueOrDefault(this.options.fontStyle,t.defaults.global.defaultFontStyle),l=e.getValueOrDefault(this.options.fontFamily,t.defaults.global.defaultFontFamily),h=e.fontString(n,r,l);if(a.fillStyle=o,a.font=h,this.isHorizontal())a.textAlign="center",a.textBaseline="middle",i=this.left+(this.right-this.left)/2,s=this.top+(this.bottom-this.top)/2,a.fillText(this.options.text,i,s);else{i="left"===this.options.position?this.left+n/2:this.right-n/2,s=this.top+(this.bottom-this.top)/2;var c="left"===this.options.position?-.5*Math.PI:.5*Math.PI;a.save(),a.translate(i,s),a.rotate(c),a.textAlign="center",a.textBaseline="middle",a.fillText(this.options.text,0,0),a.restore()}}}})}},{}],32:[function(t,e,i){"use strict";e.exports=function(t){function e(t,e){return e&&(i.isArray(e)?t=t.concat(e):t.push(e)),t}var i=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,titleColor:"#fff",titleAlign:"left",bodySpacing:2,bodyColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,yAlign:"center",xAlign:"center",caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",callbacks:{beforeTitle:i.noop,title:function(t,e){var i="";return t.length>0&&(t[0].xLabel?i=t[0].xLabel:e.labels.length>0&&t[0].indexthis._chart.height-t.height&&(this._model.yAlign="bottom");var e,i,s,a,o,n=this,r=(this._chartInstance.chartArea.left+this._chartInstance.chartArea.right)/2,l=(this._chartInstance.chartArea.top+this._chartInstance.chartArea.bottom)/2;"center"===this._model.yAlign?(e=function(t){return r>=t},i=function(t){return t>r}):(e=function(e){return e<=t.width/2},i=function(e){return e>=n._chart.width-t.width/2}),s=function(e){return e+t.width>n._chart.width},a=function(e){return e-t.width<0},o=function(t){return l>=t?"top":"bottom"},e(this._model.x)?(this._model.xAlign="left",s(this._model.x)&&(this._model.xAlign="center",this._model.yAlign=o(this._model.y))):i(this._model.x)&&(this._model.xAlign="right",a(this._model.x)&&(this._model.xAlign="center",this._model.yAlign=o(this._model.y)))},getBackgroundPoint:function(t,e){var i={x:t.x,y:t.y};return"right"===t.xAlign?i.x-=e.width:"center"===t.xAlign&&(i.x-=e.width/2),"top"===t.yAlign?i.y+=t.caretPadding+t.caretSize:"bottom"===t.yAlign?i.y-=e.height+t.caretPadding+t.caretSize:i.y-=e.height/2,"center"===t.yAlign?"left"===t.xAlign?i.x+=t.caretPadding+t.caretSize:"right"===t.xAlign&&(i.x-=t.caretPadding+t.caretSize):"left"===t.xAlign?i.x-=t.cornerRadius+t.caretPadding:"right"===t.xAlign&&(i.x+=t.cornerRadius+t.caretPadding),i},drawCaret:function(t,e,s,a){var o,n,r,l,h,c,u=this._view,d=this._chart.ctx;"center"===u.yAlign?("left"===u.xAlign?(o=t.x,n=o-u.caretSize,r=o):(o=t.x+e.width,n=o+u.caretSize,r=o),h=t.y+e.height/2,l=h-u.caretSize,c=h+u.caretSize):("left"===u.xAlign?(o=t.x+u.cornerRadius,n=o+u.caretSize,r=n+u.caretSize):"right"===u.xAlign?(o=t.x+e.width-u.cornerRadius,n=o-u.caretSize,r=n-u.caretSize):(n=t.x+e.width/2,o=n-u.caretSize,r=n+u.caretSize),"top"===u.yAlign?(l=t.y,h=l-u.caretSize,c=l):(l=t.y+e.height,h=l+u.caretSize,c=l));var f=i.color(u.backgroundColor);d.fillStyle=f.alpha(s*f.alpha()).rgbString(),d.beginPath(),d.moveTo(o,l),d.lineTo(n,h),d.lineTo(r,c),d.closePath(),d.fill()},drawTitle:function(t,e,s,a){if(e.title.length){s.textAlign=e._titleAlign,s.textBaseline="top";var o=i.color(e.titleColor);s.fillStyle=o.alpha(a*o.alpha()).rgbString(),s.font=i.fontString(e.titleFontSize,e._titleFontStyle,e._titleFontFamily),i.each(e.title,function(i,a){s.fillText(i,t.x,t.y),t.y+=e.titleFontSize+e.titleSpacing,a+1===e.title.length&&(t.y+=e.titleMarginBottom-e.titleSpacing)})}},drawBody:function(t,e,s,a){s.textAlign=e._bodyAlign,s.textBaseline="top";var o=i.color(e.bodyColor);s.fillStyle=o.alpha(a*o.alpha()).rgbString(),s.font=i.fontString(e.bodyFontSize,e._bodyFontStyle,e._bodyFontFamily),i.each(e.beforeBody,function(i){s.fillText(i,t.x,t.y),t.y+=e.bodyFontSize+e.bodySpacing}),i.each(e.body,function(o,n){"single"!==this._options.tooltips.mode&&(s.fillStyle=i.color(e.legendColorBackground).alpha(a).rgbaString(),s.fillRect(t.x,t.y,e.bodyFontSize,e.bodyFontSize),s.strokeStyle=i.color(e.labelColors[n].borderColor).alpha(a).rgbaString(),s.strokeRect(t.x,t.y,e.bodyFontSize,e.bodyFontSize),s.fillStyle=i.color(e.labelColors[n].backgroundColor).alpha(a).rgbaString(),s.fillRect(t.x+1,t.y+1,e.bodyFontSize-2,e.bodyFontSize-2),s.fillStyle=i.color(e.bodyColor).alpha(a).rgbaString()),s.fillText(o,t.x+("single"!==this._options.tooltips.mode?e.bodyFontSize+2:0),t.y),t.y+=e.bodyFontSize+e.bodySpacing},this),i.each(e.afterBody,function(i){s.fillText(i,t.x,t.y),t.y+=e.bodyFontSize}),t.y-=e.bodySpacing},drawFooter:function(t,e,s,a){if(e.footer.length){t.y+=e.footerMarginTop,s.textAlign=e._footerAlign,s.textBaseline="top";var o=i.color(e.footerColor);s.fillStyle=o.alpha(a*o.alpha()).rgbString(),s.font=i.fontString(e.footerFontSize,e._footerFontStyle,e._footerFontFamily),i.each(e.footer,function(i){s.fillText(i,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 s=e.caretPadding,a=this.getTooltipSize(e),o={x:e.x,y:e.y},n=Math.abs(e.opacity<.001)?0:e.opacity;if(this._options.tooltips.enabled){var r=i.color(e.backgroundColor);t.fillStyle=r.alpha(n*r.alpha()).rgbString(),i.drawRoundedRectangle(t,o.x,o.y,a.width,a.height,e.cornerRadius),t.fill(),this.drawCaret(o,a,n,s),o.x+=e.xPadding,o.y+=e.yPadding,this.drawTitle(o,e,t,n),this.drawBody(o,e,t,n),this.drawFooter(o,e,t,n)}}}})}},{}],33:[function(t,e,i){"use strict";e.exports=function(t,e){var i=t.helpers;t.defaults.global.elements.arc={backgroundColor:t.defaults.global.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)1.5*Math.PI?s.startAngle-2*Math.PI:s.startAngle,n=s.endAngle<-.5*Math.PI?s.endAngle+2*Math.PI:s.endAngle>1.5*Math.PI?s.endAngle-2*Math.PI:s.endAngle,r=a.angle>=o&&a.angle<=n,l=a.distance>=s.innerRadius&&a.distance<=s.outerRadius;return r&&l}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;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,e.startAngle,e.endAngle),t.arc(e.x,e.y,e.innerRadius,e.endAngle,e.startAngle,!0),t.closePath(),t.strokeStyle=e.borderColor,t.lineWidth=e.borderWidth,t.fillStyle=e.backgroundColor,t.fill(),t.lineJoin="bevel",e.borderWidth&&t.stroke()}})}},{}],34:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.global.elements.line={tension:.4,backgroundColor:t.defaults.global.defaultColor,borderWidth:3,borderColor:t.defaults.global.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",fill:!0},t.elements.Line=t.Element.extend({lineToNextPoint:function(t,e,i,s,a){var o=this._chart.ctx;e._view.skip?s.call(this,t,e,i):t._view.skip?a.call(this,t,e,i):0===e._view.tension?o.lineTo(e._view.x,e._view.y):o.bezierCurveTo(t._view.controlPointNextX,t._view.controlPointNextY,e._view.controlPointPreviousX,e._view.controlPointPreviousY,e._view.x,e._view.y)},draw:function(){function i(t){n._view.skip||r._view.skip?t&&o.lineTo(s._view.scaleZero.x,s._view.scaleZero.y):o.bezierCurveTo(r._view.controlPointNextX,r._view.controlPointNextY,n._view.controlPointPreviousX,n._view.controlPointPreviousY,n._view.x,n._view.y)}var s=this,a=this._view,o=this._chart.ctx,n=this._children[0],r=this._children[this._children.length-1];o.save(),this._children.length>0&&a.fill&&(o.beginPath(),e.each(this._children,function(t,i){var s=e.previousItem(this._children,i),n=e.nextItem(this._children,i);0===i?(this._loop?o.moveTo(a.scaleZero.x,a.scaleZero.y):o.moveTo(t._view.x,a.scaleZero),t._view.skip?this._loop||o.moveTo(n._view.x,this._view.scaleZero):o.lineTo(t._view.x,t._view.y)):this.lineToNextPoint(s,t,n,function(t,e,i){this._loop?o.lineTo(this._view.scaleZero.x,this._view.scaleZero.y):(o.lineTo(t._view.x,this._view.scaleZero),o.moveTo(i._view.x,this._view.scaleZero))},function(t,e){o.lineTo(e._view.x,e._view.y)})},this),this._loop?i(!0):(o.lineTo(this._children[this._children.length-1]._view.x,a.scaleZero),o.lineTo(this._children[0]._view.x,a.scaleZero)),o.fillStyle=a.backgroundColor||t.defaults.global.defaultColor,o.closePath(),o.fill()),o.lineCap=a.borderCapStyle||t.defaults.global.elements.line.borderCapStyle,o.setLineDash&&o.setLineDash(a.borderDash||t.defaults.global.elements.line.borderDash),o.lineDashOffset=a.borderDashOffset||t.defaults.global.elements.line.borderDashOffset,o.lineJoin=a.borderJoinStyle||t.defaults.global.elements.line.borderJoinStyle,o.lineWidth=a.borderWidth||t.defaults.global.elements.line.borderWidth,o.strokeStyle=a.borderColor||t.defaults.global.defaultColor,o.beginPath(),e.each(this._children,function(t,i){var s=e.previousItem(this._children,i),a=e.nextItem(this._children,i);0===i?o.moveTo(t._view.x,t._view.y):this.lineToNextPoint(s,t,a,function(t,e,i){o.moveTo(i._view.x,i._view.y)},function(t,e){o.moveTo(e._view.x,e._view.y)})},this),this._loop&&this._children.length>0&&i(),o.stroke(),o.restore()}})}},{}],35:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.global.elements.point={radius:3,pointStyle:"circle",backgroundColor:t.defaults.global.defaultColor,borderWidth:1,borderColor:t.defaults.global.defaultColor,hitRadius:1,hoverRadius:4,hoverBorderWidth:1},t.elements.Point=t.Element.extend({inRange:function(t,e){var i=this._view;if(i){var s=i.hitRadius+i.radius;return Math.pow(t-i.x,2)+Math.pow(e-i.y,2)0){s.strokeStyle=i.borderColor||t.defaults.global.defaultColor,s.lineWidth=e.getValueOrDefault(i.borderWidth,t.defaults.global.elements.point.borderWidth),s.fillStyle=i.backgroundColor||t.defaults.global.defaultColor;var a,o,n=i.radius;switch(i.pointStyle){default:s.beginPath(),s.arc(i.x,i.y,n,0,2*Math.PI),s.closePath(),s.fill();break;case"triangle":s.beginPath();var r=3*n/Math.sqrt(3),l=r*Math.sqrt(3)/2;s.moveTo(i.x-r/2,i.y+l/3),s.lineTo(i.x+r/2,i.y+l/3),s.lineTo(i.x,i.y-2*l/3),s.closePath(),s.fill();break;case"rect":s.fillRect(i.x-1/Math.SQRT2*n,i.y-1/Math.SQRT2*n,2/Math.SQRT2*n,2/Math.SQRT2*n),s.strokeRect(i.x-1/Math.SQRT2*n,i.y-1/Math.SQRT2*n,2/Math.SQRT2*n,2/Math.SQRT2*n);break;case"rectRot":s.translate(i.x,i.y),s.rotate(Math.PI/4),s.fillRect(-1/Math.SQRT2*n,-1/Math.SQRT2*n,2/Math.SQRT2*n,2/Math.SQRT2*n),s.strokeRect(-1/Math.SQRT2*n,-1/Math.SQRT2*n,2/Math.SQRT2*n,2/Math.SQRT2*n),s.setTransform(1,0,0,1,0,0);break;case"cross":s.beginPath(),s.moveTo(i.x,i.y+n),s.lineTo(i.x,i.y-n),s.moveTo(i.x-n,i.y),s.lineTo(i.x+n,i.y),s.closePath();break;case"crossRot":s.beginPath(),a=Math.cos(Math.PI/4)*n,o=Math.sin(Math.PI/4)*n,s.moveTo(i.x-a,i.y-o),s.lineTo(i.x+a,i.y+o),s.moveTo(i.x-a,i.y+o),s.lineTo(i.x+a,i.y-o),s.closePath();break;case"star":s.beginPath(),s.moveTo(i.x,i.y+n),s.lineTo(i.x,i.y-n),s.moveTo(i.x-n,i.y),s.lineTo(i.x+n,i.y),a=Math.cos(Math.PI/4)*n,o=Math.sin(Math.PI/4)*n,s.moveTo(i.x-a,i.y-o),s.lineTo(i.x+a,i.y+o),s.moveTo(i.x-a,i.y+o),s.lineTo(i.x+a,i.y-o),s.closePath();break;case"line":s.beginPath(),s.moveTo(i.x-n,i.y),s.lineTo(i.x+n,i.y),s.closePath();break;case"dash":s.beginPath(),s.moveTo(i.x,i.y),s.lineTo(i.x+n,i.y),s.closePath()}s.stroke()}}}})}},{}],36:[function(t,e,i){"use strict";e.exports=function(t){t.helpers;t.defaults.global.elements.rectangle={backgroundColor:t.defaults.global.defaultColor,borderWidth:0,borderColor:t.defaults.global.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,s=i.width/2,a=i.x-s,o=i.x+s,n=i.base-(i.base-i.y),r=i.borderWidth/2;i.borderWidth&&(a+=r,o-=r,n+=r),e.beginPath(),e.fillStyle=i.backgroundColor,e.strokeStyle=i.borderColor,e.lineWidth=i.borderWidth;var l=[[a,i.base],[a,n],[o,n],[o,i.base]],h=["bottom","left","top","right"],c=h.indexOf(i.borderSkipped,0);-1===c&&(c=0),e.moveTo.apply(e,t(0));for(var u=1;4>u;u++)e.lineTo.apply(e,t(u));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,s=!1;return i&&(s=i.y=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),s},inLabelRange:function(t){var e=this._view;return e?t>=e.x-e.width/2&&t<=e.x+e.width/2:!1},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}})}},{}],37:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i={position:"bottom"},s=t.Scale.extend({buildTicks:function(t){this.startIndex=0,this.endIndex=this.chart.data.labels.length;var i;void 0!==this.options.ticks.min&&(i=e.indexOf(this.chart.data.labels,this.options.ticks.min),this.startIndex=-1!==i?i:this.startIndex),void 0!==this.options.ticks.max&&(i=e.indexOf(this.chart.data.labels,this.options.ticks.max),this.endIndex=-1!==i?i:this.endIndex),this.ticks=0===this.startIndex&&this.endIndex===this.chart.data.labels.length?this.chart.data.labels:this.chart.data.labels.slice(this.startIndex,this.endIndex+1)},getLabelForIndex:function(t,e){return this.ticks[t]},getPixelForValue:function(t,e,i,s){var a=Math.max(this.ticks.length-(this.options.gridLines.offsetGridLines?0:1),1);if(this.isHorizontal()){var o=this.width-(this.paddingLeft+this.paddingRight),n=o/a,r=n*(e-this.startIndex)+this.paddingLeft;return this.options.gridLines.offsetGridLines&&s&&(r+=n/2),this.left+Math.round(r)}var l=this.height-(this.paddingTop+this.paddingBottom),h=l/a,c=h*(e-this.startIndex)+this.paddingTop;return this.options.gridLines.offsetGridLines&&s&&(c+=h/2),this.top+Math.round(c)},getPixelForTick:function(t,e){return this.getPixelForValue(this.ticks[t],t+this.startIndex,null,e)}});t.scaleService.registerScaleType("category",s,i)}},{}],38:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i={position:"left",ticks:{callback:function(t,i,s){var a=s[1]-s[0];Math.abs(a)>1&&t!==Math.floor(t)&&(a=t-Math.floor(t));var o=e.log10(Math.abs(a)),n="";if(0!==t){var r=-1*Math.floor(o);r=Math.max(Math.min(r,20),0),n=t.toFixed(r)}else n="0";return n}}},s=t.Scale.extend({determineDataLimits:function(){if(this.min=null,this.max=null,this.options.stacked){var t={},i=!1,s=!1;e.each(this.chart.data.datasets,function(a){void 0===t[a.type]&&(t[a.type]={positiveValues:[],negativeValues:[]});var o=t[a.type].positiveValues,n=t[a.type].negativeValues;e.isDatasetVisible(a)&&(this.isHorizontal()?a.xAxisID===this.id:a.yAxisID===this.id)&&e.each(a.data,function(t,e){var a=+this.getRightValue(t);isNaN(a)||(o[e]=o[e]||0,n[e]=n[e]||0,this.options.relativePoints?o[e]=100:0>a?(s=!0,n[e]+=a):(i=!0,o[e]+=a))},this)},this),e.each(t,function(t){var i=t.positiveValues.concat(t.negativeValues),s=e.min(i),a=e.max(i);this.min=null===this.min?s:Math.min(this.min,s),this.max=null===this.max?a:Math.max(this.max,a)},this)}else e.each(this.chart.data.datasets,function(t){e.isDatasetVisible(t)&&(this.isHorizontal()?t.xAxisID===this.id:t.yAxisID===this.id)&&e.each(t.data,function(t,e){var i=+this.getRightValue(t);isNaN(i)||(null===this.min?this.min=i:ithis.max&&(this.max=i))},this)},this);if(this.options.ticks.beginAtZero){var a=e.sign(this.min),o=e.sign(this.max);0>a&&0>o?this.max=0:a>0&&o>0&&(this.min=0)}void 0!==this.options.ticks.min?this.min=this.options.ticks.min:void 0!==this.options.ticks.suggestedMin&&(this.min=Math.min(this.min,this.options.ticks.suggestedMin)),void 0!==this.options.ticks.max?this.max=this.options.ticks.max:void 0!==this.options.ticks.suggestedMax&&(this.max=Math.max(this.max,this.options.ticks.suggestedMax)),this.min===this.max&&(this.min--,this.max++)},buildTicks:function(){this.ticks=[];var i;if(this.isHorizontal())i=Math.min(this.options.ticks.maxTicksLimit?this.options.ticks.maxTicksLimit:11,Math.ceil(this.width/50));else{var s=e.getValueOrDefault(this.options.ticks.fontSize,t.defaults.global.defaultFontSize);i=Math.min(this.options.ticks.maxTicksLimit?this.options.ticks.maxTicksLimit:11,Math.ceil(this.height/(2*s)))}i=Math.max(2,i);var a,o=this.options.ticks.fixedStepSize&&this.options.ticks.fixedStepSize>0||this.options.ticks.stepSize&&this.options.ticks.stepSize>0;if(o)a=e.getValueOrDefault(this.options.ticks.fixedStepSize,this.options.ticks.stepSize);else{var n=e.niceNum(this.max-this.min,!1);a=e.niceNum(n/(i-1),!0)}var r=Math.floor(this.min/a)*a,l=Math.ceil(this.max/a)*a,h=(l-r)/a;h=e.almostEquals(h,Math.round(h),a/1e3)?Math.round(h):Math.ceil(h),this.ticks.push(void 0!==this.options.ticks.min?this.options.ticks.min:r);for(var c=1;h>c;++c)this.ticks.push(r+c*a);this.ticks.push(void 0!==this.options.ticks.max?this.options.ticks.max:l),("left"===this.options.position||"right"===this.options.position)&&this.ticks.reverse(),this.max=e.max(this.ticks),this.min=e.min(this.ticks),this.options.ticks.reverse?(this.ticks.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},convertTicksToLabels:function(){this.ticksAsNumbers=this.ticks.slice(),this.zeroLineIndex=this.ticks.indexOf(0),t.Scale.prototype.convertTicksToLabels.call(this)},getPixelForValue:function(t,e,i,s){var a,o=+this.getRightValue(t),n=this.end-this.start;if(this.isHorizontal()){var r=this.width-(this.paddingLeft+this.paddingRight);return a=this.left+r/n*(o-this.start),Math.round(a+this.paddingLeft)}var l=this.height-(this.paddingTop+this.paddingBottom);return a=this.bottom-this.paddingBottom-l/n*(o-this.start),Math.round(a)},getPixelForTick:function(t,e){return this.getPixelForValue(this.ticksAsNumbers[t],null,null,e)}});t.scaleService.registerScaleType("linear",s,i)}},{}],39:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i={position:"left",ticks:{callback:function(e,i,s){var a=e/Math.pow(10,Math.floor(t.helpers.log10(e)));return 1===a||2===a||5===a||0===i||i===s.length-1?e.toExponential():""}}},s=t.Scale.extend({determineDataLimits:function(){if(this.min=null,this.max=null,this.options.stacked){var t={};e.each(this.chart.data.datasets,function(i){e.isDatasetVisible(i)&&(this.isHorizontal()?i.xAxisID===this.id:i.yAxisID===this.id)&&(void 0===t[i.type]&&(t[i.type]=[]),e.each(i.data,function(e,s){var a=t[i.type],o=+this.getRightValue(e);isNaN(o)||(a[s]=a[s]||0,this.options.relativePoints?a[s]=100:a[s]+=o)},this))},this),e.each(t,function(t){var i=e.min(t),s=e.max(t);this.min=null===this.min?i:Math.min(this.min,i),this.max=null===this.max?s:Math.max(this.max,s)},this)}else e.each(this.chart.data.datasets,function(t){e.isDatasetVisible(t)&&(this.isHorizontal()?t.xAxisID===this.id:t.yAxisID===this.id)&&e.each(t.data,function(t,e){var i=+this.getRightValue(t);isNaN(i)||(null===this.min?this.min=i:ithis.max&&(this.max=i))},this)},this);this.min=void 0!==this.options.ticks.min?this.options.ticks.min:this.min,this.max=void 0!==this.options.ticks.max?this.options.ticks.max:this.max,this.min===this.max&&(0!==this.min&&null!==this.min?(this.min=Math.pow(10,Math.floor(e.log10(this.min))-1),this.max=Math.pow(10,Math.floor(e.log10(this.max))+1)):(this.min=1,this.max=10))},buildTicks:function(){this.ticks=[];for(var t=void 0!==this.options.ticks.min?this.options.ticks.min:Math.pow(10,Math.floor(e.log10(this.min)));tthis.max&&(this.max=i))},this)},this),this.options.ticks.beginAtZero){var t=e.sign(this.min),i=e.sign(this.max);0>t&&0>i?this.max=0:t>0&&i>0&&(this.min=0)}void 0!==this.options.ticks.min?this.min=this.options.ticks.min:void 0!==this.options.ticks.suggestedMin&&(this.min=Math.min(this.min,this.options.ticks.suggestedMin)),void 0!==this.options.ticks.max?this.max=this.options.ticks.max:void 0!==this.options.ticks.suggestedMax&&(this.max=Math.max(this.max,this.options.ticks.suggestedMax)),this.min===this.max&&(this.min--,this.max++)},buildTicks:function(){this.ticks=[];var i=e.getValueOrDefault(this.options.ticks.fontSize,t.defaults.global.defaultFontSize),s=Math.min(this.options.ticks.maxTicksLimit?this.options.ticks.maxTicksLimit:11,Math.ceil(this.drawingArea/(1.5*i)));s=Math.max(2,s);var a=e.niceNum(this.max-this.min,!1),o=e.niceNum(a/(s-1),!0),n=Math.floor(this.min/o)*o,r=Math.ceil(this.max/o)*o,l=Math.ceil((r-n)/o);this.ticks.push(void 0!==this.options.ticks.min?this.options.ticks.min:n);for(var h=1;l>h;++h)this.ticks.push(n+h*o);this.ticks.push(void 0!==this.options.ticks.max?this.options.ticks.max:r),this.max=e.max(this.ticks),this.min=e.min(this.ticks),this.options.ticks.reverse?(this.ticks.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),this.zeroLineIndex=this.ticks.indexOf(0)},convertTicksToLabels:function(){t.Scale.prototype.convertTicksToLabels.call(this),this.pointLabels=this.chart.data.labels.map(this.options.pointLabels.callback,this)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var i,s,a,o,n,r,l,h,c,u,d,f,m=e.getValueOrDefault(this.options.pointLabels.fontSize,t.defaults.global.defaultFontSize),g=e.getValueOrDefault(this.options.pointLabels.fontStyle,t.defaults.global.defaultFontStyle),p=e.getValueOrDefault(this.options.pointLabels.fontFamily,t.defaults.global.defaultFontFamily),b=e.fontString(m,g,p),v=e.min([this.height/2-m-5,this.width/2]),x=this.width,y=0;for(this.ctx.font=b,s=0;sx&&(x=i.x+o,n=s),i.x-ox&&(x=i.x+a,n=s):s>this.getValueCount()/2&&i.x-a0||this.options.reverse){var o=this.getDistanceFromCenterForValue(this.ticks[a]),n=this.yCenter-o;if(this.options.gridLines.display)if(i.strokeStyle=this.options.gridLines.color,i.lineWidth=this.options.gridLines.lineWidth,this.options.lineArc)i.beginPath(),i.arc(this.xCenter,this.yCenter,o,0,2*Math.PI),i.closePath(),i.stroke();else{i.beginPath();for(var r=0;r=0;s--){if(this.options.angleLines.display){var a=this.getPointPosition(s,this.getDistanceFromCenterForValue(this.options.reverse?this.min:this.max));i.beginPath(),i.moveTo(this.xCenter,this.yCenter),i.lineTo(a.x,a.y),i.stroke(),i.closePath()}var o=this.getPointPosition(s,this.getDistanceFromCenterForValue(this.options.reverse?this.min:this.max)+5),n=e.getValueOrDefault(this.options.pointLabels.fontColor,t.defaults.global.defaultFontColor),r=e.getValueOrDefault(this.options.pointLabels.fontSize,t.defaults.global.defaultFontSize),l=e.getValueOrDefault(this.options.pointLabels.fontStyle,t.defaults.global.defaultFontStyle),h=e.getValueOrDefault(this.options.pointLabels.fontFamily,t.defaults.global.defaultFontFamily),c=e.fontString(r,l,h);i.font=c,i.fillStyle=n;var u=this.pointLabels.length,d=this.pointLabels.length/2,f=d/2,m=f>s||s>u-f,g=s===f||s===u-f;0===s?i.textAlign="center":s===d?i.textAlign="center":d>s?i.textAlign="left":i.textAlign="right",g?i.textBaseline="middle":m?i.textBaseline="bottom":i.textBaseline="top",i.fillText(this.pointLabels[s]?this.pointLabels[s]:"",o.x,o.y)}}}}});t.scaleService.registerScaleType("radialLinear",s,i)}},{}],41:[function(t,e,i){"use strict";var s=t("moment");s="function"==typeof s?s:window.moment,e.exports=function(t){var e=t.helpers,i={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}]},a={position:"bottom",time:{parser:!1,format:!1,unit:!1,round:!1,displayFormat:!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(!s)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 this.labelMoments[t][e]},determineDataLimits:function(){this.labelMoments=[];var t=[];this.chart.data.labels&&this.chart.data.labels.length>0?(e.each(this.chart.data.labels,function(e,i){var s=this.parseTime(e);this.options.time.round&&s.startOf(this.options.time.round),t.push(s)},this),this.firstTick=s.min.call(this,t), -this.lastTick=s.max.call(this,t)):(this.firstTick=null,this.lastTick=null),e.each(this.chart.data.datasets,function(i,a){var o=[];"object"==typeof i.data[0]?e.each(i.data,function(t,e){var i=this.parseTime(this.getRightValue(t));this.options.time.round&&i.startOf(this.options.time.round),o.push(i),this.firstTick=null!==this.firstTick?s.min(this.firstTick,i):i,this.lastTick=null!==this.lastTick?s.max(this.lastTick,i):i},this):o=t,this.labelMoments.push(o)},this),this.options.time.min&&(this.firstTick=this.parseTime(this.options.time.min)),this.options.time.max&&(this.lastTick=this.parseTime(this.options.time.max)),this.firstTick=(this.firstTick||s()).clone(),this.lastTick=(this.lastTick||s()).clone()},buildTicks:function(s){if(this.ticks=[],this.unitScale=1,this.scaleSizeInUnits=0,this.options.time.unit)this.tickUnit=this.options.time.unit||"day",this.displayFormat=this.options.time.displayFormats[this.tickUnit],this.scaleSizeInUnits=this.lastTick.diff(this.firstTick,this.tickUnit,!0),this.unitScale=e.getValueOrDefault(this.options.time.unitStepSize,1);else{var a=e.getValueOrDefault(this.options.ticks.fontSize,t.defaults.global.defaultFontSize),o=this.isHorizontal()?this.width-(this.paddingLeft+this.paddingRight):this.height-(this.paddingTop+this.paddingBottom),n=this.tickFormatFunction(this.firstTick,0,[]),r=n.length*a,l=Math.cos(e.toRadians(this.options.ticks.maxRotation)),h=Math.sin(e.toRadians(this.options.ticks.maxRotation));r=r*l+a*h;var c=o/(r+10);this.tickUnit="millisecond",this.scaleSizeInUnits=this.lastTick.diff(this.firstTick,this.tickUnit,!0),this.displayFormat=this.options.time.displayFormats[this.tickUnit];for(var u=0,d=i.units[u];uMath.ceil(this.scaleSizeInUnits/c)){this.unitScale=e.getValueOrDefault(this.options.time.unitStepSize,d.steps[f]);break}break}if(d.maxStep===!1||Math.ceil(this.scaleSizeInUnits/c)=0)break;g%this.unitScale===0&&this.ticks.push(p)}(0!==this.ticks[this.ticks.length-1].diff(this.lastTick,this.tickUnit)||0===this.scaleSizeInUnits)&&(this.options.time.max?(this.ticks.push(this.lastTick.clone()),this.scaleSizeInUnits=this.lastTick.diff(this.ticks[0],this.tickUnit,!0)):(this.scaleSizeInUnits=Math.ceil(this.scaleSizeInUnits/this.unitScale)*this.unitScale,this.ticks.push(this.firstTick.clone().add(this.scaleSizeInUnits,this.tickUnit)),this.lastTick=this.ticks[this.ticks.length-1].clone()))},getLabelForIndex:function(t,e){var i=this.chart.data.labels&&t0&&r.max>0?r.getPixelForValue(r.min):r.getPixelForValue(0),e.extend(t,{_chart:this.chart.chart,_xScale:n,_yScale:r,_datasetIndex:this.index,_index:i,_model:{x:this.calculateBarX(i,this.index),y:a?o:this.calculateBarY(i,this.index),label:this.chart.data.labels[i],datasetLabel:this.getDataset().label,base:a?o:this.calculateBarBase(this.index,i),width:this.calculateBarWidth(s),backgroundColor:t.custom&&t.custom.backgroundColor?t.custom.backgroundColor:e.getValueAtIndexOrDefault(this.getDataset().backgroundColor,i,this.chart.options.elements.rectangle.backgroundColor),borderSkipped:t.custom&&t.custom.borderSkipped?t.custom.borderSkipped:this.chart.options.elements.rectangle.borderSkipped,borderColor:t.custom&&t.custom.borderColor?t.custom.borderColor:e.getValueAtIndexOrDefault(this.getDataset().borderColor,i,this.chart.options.elements.rectangle.borderColor),borderWidth:t.custom&&t.custom.borderWidth?t.custom.borderWidth:e.getValueAtIndexOrDefault(this.getDataset().borderWidth,i,this.chart.options.elements.rectangle.borderWidth)}}),t.pivot()},calculateBarBase:function(t,i){var a=(this.getScaleForId(this.getDataset().xAxisID),this.getScaleForId(this.getDataset().yAxisID)),s=0;if(a.options.stacked){var o=this.chart.data.datasets[t].data[i];if(0>o)for(var n=0;t>n;n++){var r=this.chart.data.datasets[n];e.isDatasetVisible(r)&&r.yAxisID===a.id&&r.bar&&(s+=r.data[i]<0?r.data[i]:0)}else for(var l=0;t>l;l++){var h=this.chart.data.datasets[l];e.isDatasetVisible(h)&&h.yAxisID===a.id&&h.bar&&(s+=h.data[i]>0?h.data[i]:0)}return a.getPixelForValue(s)}return s=a.getPixelForValue(a.min),a.beginAtZero||a.min<=0&&a.max>=0||a.min>=0&&a.max<=0?s=a.getPixelForValue(0,0):a.min<0&&a.max<0&&(s=a.getPixelForValue(a.max)),s},getRuler:function(){var t=this.getScaleForId(this.getDataset().xAxisID),e=(this.getScaleForId(this.getDataset().yAxisID),this.getBarCount()),i=function(){for(var e=t.getPixelForTick(1)-t.getPixelForTick(0),i=2;ia;++a)e.isDatasetVisible(this.chart.data.datasets[a])&&this.chart.data.datasets[a].bar&&++i;return i},calculateBarX:function(t,e){var i=(this.getScaleForId(this.getDataset().yAxisID),this.getScaleForId(this.getDataset().xAxisID)),a=this.getBarIndex(e),s=this.getRuler(),o=i.getPixelForValue(null,t,e,this.chart.isCombo);return o-=this.chart.isCombo?s.tickWidth/2:0,i.options.stacked?o+s.categoryWidth/2+s.categorySpacing:o+s.barWidth/2+s.categorySpacing+s.barWidth*a+s.barSpacing/2+s.barSpacing*a},calculateBarY:function(t,i){var a=(this.getScaleForId(this.getDataset().xAxisID),this.getScaleForId(this.getDataset().yAxisID)),s=this.getDataset().data[t];if(a.options.stacked){for(var o=0,n=0,r=0;i>r;r++){var l=this.chart.data.datasets[r];e.isDatasetVisible(l)&&l.bar&&l.yAxisID===a.id&&(l.data[t]<0?n+=l.data[t]||0:o+=l.data[t]||0)}return 0>s?a.getPixelForValue(n+s):a.getPixelForValue(o+s)}return a.getPixelForValue(s)},draw:function(t){var i=t||1;e.each(this.getDataset().metaData,function(t,e){var a=this.getDataset().data[e];null===a||void 0===a||isNaN(a)||t.transition(i).draw()},this)},setHoverStyle:function(t){var i=this.chart.data.datasets[t._datasetIndex],a=t._index;t._model.backgroundColor=t.custom&&t.custom.hoverBackgroundColor?t.custom.hoverBackgroundColor:e.getValueAtIndexOrDefault(i.hoverBackgroundColor,a,e.color(t._model.backgroundColor).saturate(.5).darken(.1).rgbString()),t._model.borderColor=t.custom&&t.custom.hoverBorderColor?t.custom.hoverBorderColor:e.getValueAtIndexOrDefault(i.hoverBorderColor,a,e.color(t._model.borderColor).saturate(.5).darken(.1).rgbString()),t._model.borderWidth=t.custom&&t.custom.hoverBorderWidth?t.custom.hoverBorderWidth:e.getValueAtIndexOrDefault(i.hoverBorderWidth,a,t._model.borderWidth)},removeHoverStyle:function(t){var i=(this.chart.data.datasets[t._datasetIndex],t._index);t._model.backgroundColor=t.custom&&t.custom.backgroundColor?t.custom.backgroundColor:e.getValueAtIndexOrDefault(this.getDataset().backgroundColor,i,this.chart.options.elements.rectangle.backgroundColor),t._model.borderColor=t.custom&&t.custom.borderColor?t.custom.borderColor:e.getValueAtIndexOrDefault(this.getDataset().borderColor,i,this.chart.options.elements.rectangle.borderColor),t._model.borderWidth=t.custom&&t.custom.borderWidth?t.custom.borderWidth:e.getValueAtIndexOrDefault(this.getDataset().borderWidth,i,this.chart.options.elements.rectangle.borderWidth)}})}},{}],16:[function(t,e,i){"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(t,e){return""},label:function(t,e){var i=e.datasets[t.datasetIndex].label||"",a=e.datasets[t.datasetIndex].data[t.index];return i+": ("+a.x+", "+a.y+", "+a.r+")"}}}},t.controllers.bubble=t.DatasetController.extend({addElements:function(){this.getDataset().metaData=this.getDataset().metaData||[],e.each(this.getDataset().data,function(e,i){this.getDataset().metaData[i]=this.getDataset().metaData[i]||new t.elements.Point({_chart:this.chart.chart,_datasetIndex:this.index,_index:i})},this)},addElementAndReset:function(e){this.getDataset().metaData=this.getDataset().metaData||[];var i=new t.elements.Point({_chart:this.chart.chart,_datasetIndex:this.index,_index:e});this.updateElement(i,e,!0),this.getDataset().metaData.splice(e,0,i)},update:function(t){var i,a=this.getDataset().metaData,s=this.getScaleForId(this.getDataset().yAxisID);this.getScaleForId(this.getDataset().xAxisID);i=s.min<0&&s.max<0?s.getPixelForValue(s.max):s.min>0&&s.max>0?s.getPixelForValue(s.min):s.getPixelForValue(0),e.each(a,function(e,i){this.updateElement(e,i,t)},this)},updateElement:function(t,i,a){var s,o=this.getScaleForId(this.getDataset().yAxisID),n=this.getScaleForId(this.getDataset().xAxisID);s=o.min<0&&o.max<0?o.getPixelForValue(o.max):o.min>0&&o.max>0?o.getPixelForValue(o.min):o.getPixelForValue(0),e.extend(t,{_chart:this.chart.chart,_xScale:n,_yScale:o,_datasetIndex:this.index,_index:i,_model:{x:a?n.getPixelForDecimal(.5):n.getPixelForValue(this.getDataset().data[i],i,this.index,this.chart.isCombo),y:a?s:o.getPixelForValue(this.getDataset().data[i],i,this.index),radius:a?0:t.custom&&t.custom.radius?t.custom.radius:this.getRadius(this.getDataset().data[i]),backgroundColor:t.custom&&t.custom.backgroundColor?t.custom.backgroundColor:e.getValueAtIndexOrDefault(this.getDataset().backgroundColor,i,this.chart.options.elements.point.backgroundColor),borderColor:t.custom&&t.custom.borderColor?t.custom.borderColor:e.getValueAtIndexOrDefault(this.getDataset().borderColor,i,this.chart.options.elements.point.borderColor),borderWidth:t.custom&&t.custom.borderWidth?t.custom.borderWidth:e.getValueAtIndexOrDefault(this.getDataset().borderWidth,i,this.chart.options.elements.point.borderWidth),hitRadius:t.custom&&t.custom.hitRadius?t.custom.hitRadius:e.getValueAtIndexOrDefault(this.getDataset().hitRadius,i,this.chart.options.elements.point.hitRadius)}}),t._model.skip=t.custom&&t.custom.skip?t.custom.skip:isNaN(t._model.x)||isNaN(t._model.y),t.pivot()},getRadius:function(t){return t.r||this.chart.options.elements.point.radius},draw:function(t){var i=t||1;e.each(this.getDataset().metaData,function(t,e){t.transition(i),t.draw()})},setHoverStyle:function(t){var i=this.chart.data.datasets[t._datasetIndex],a=t._index;t._model.radius=t.custom&&t.custom.hoverRadius?t.custom.hoverRadius:e.getValueAtIndexOrDefault(i.hoverRadius,a,this.chart.options.elements.point.hoverRadius)+this.getRadius(this.getDataset().data[t._index]),t._model.backgroundColor=t.custom&&t.custom.hoverBackgroundColor?t.custom.hoverBackgroundColor:e.getValueAtIndexOrDefault(i.hoverBackgroundColor,a,e.color(t._model.backgroundColor).saturate(.5).darken(.1).rgbString()),t._model.borderColor=t.custom&&t.custom.hoverBorderColor?t.custom.hoverBorderColor:e.getValueAtIndexOrDefault(i.hoverBorderColor,a,e.color(t._model.borderColor).saturate(.5).darken(.1).rgbString()),t._model.borderWidth=t.custom&&t.custom.hoverBorderWidth?t.custom.hoverBorderWidth:e.getValueAtIndexOrDefault(i.hoverBorderWidth,a,t._model.borderWidth)},removeHoverStyle:function(t){var i=(this.chart.data.datasets[t._datasetIndex],t._index);t._model.radius=t.custom&&t.custom.radius?t.custom.radius:this.getRadius(this.getDataset().data[t._index]),t._model.backgroundColor=t.custom&&t.custom.backgroundColor?t.custom.backgroundColor:e.getValueAtIndexOrDefault(this.getDataset().backgroundColor,i,this.chart.options.elements.point.backgroundColor),t._model.borderColor=t.custom&&t.custom.borderColor?t.custom.borderColor:e.getValueAtIndexOrDefault(this.getDataset().borderColor,i,this.chart.options.elements.point.borderColor),t._model.borderWidth=t.custom&&t.custom.borderWidth?t.custom.borderWidth:e.getValueAtIndexOrDefault(this.getDataset().borderWidth,i,this.chart.options.elements.point.borderWidth)}})}},{}],17:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.doughnut={animation:{animateRotate:!0,animateScale:!1},aspectRatio:1,hover:{mode:"single"},legendCallback:function(t){var e=[];if(e.push('
    '),t.data.datasets.length)for(var i=0;i'),t.data.labels[i]&&e.push(t.data.labels[i]),e.push("");return e.push("
"),e.join("")},legend:{labels:{generateLabels:function(t){return t.labels.length&&t.datasets.length?t.labels.map(function(e,i){return{text:e,fillStyle:t.datasets[0].backgroundColor[i],hidden:isNaN(t.datasets[0].data[i]),index:i}}):[]}},onClick:function(t,i){e.each(this.chart.data.datasets,function(t){t.metaHiddenData=t.metaHiddenData||[];var e=i.index;isNaN(t.data[e])?isNaN(t.metaHiddenData[e])||(t.data[e]=t.metaHiddenData[e]):(t.metaHiddenData[e]=t.data[e],t.data[e]=NaN)}),this.chart.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]}}}},t.defaults.pie=e.clone(t.defaults.doughnut),e.extend(t.defaults.pie,{cutoutPercentage:0}),t.controllers.doughnut=t.controllers.pie=t.DatasetController.extend({linkScales:function(){},addElements:function(){this.getDataset().metaData=this.getDataset().metaData||[],e.each(this.getDataset().data,function(e,i){this.getDataset().metaData[i]=this.getDataset().metaData[i]||new t.elements.Arc({_chart:this.chart.chart,_datasetIndex:this.index,_index:i})},this)},addElementAndReset:function(i,a){this.getDataset().metaData=this.getDataset().metaData||[];var s=new t.elements.Arc({_chart:this.chart.chart,_datasetIndex:this.index,_index:i});a&&e.isArray(this.getDataset().backgroundColor)&&this.getDataset().backgroundColor.splice(i,0,a),this.updateElement(s,i,!0),this.getDataset().metaData.splice(i,0,s)},getVisibleDatasetCount:function(){return e.where(this.chart.data.datasets,function(t){return e.isDatasetVisible(t)}).length},getRingIndex:function(t){for(var i=0,a=0;t>a;++a)e.isDatasetVisible(this.chart.data.datasets[a])&&++i;return i},update:function(t){var i=this.chart.chartArea.right-this.chart.chartArea.left-this.chart.options.elements.arc.borderWidth,a=this.chart.chartArea.bottom-this.chart.chartArea.top-this.chart.options.elements.arc.borderWidth,s=Math.min(i,a),o={x:0,y:0};if(this.chart.options.circumference&&this.chart.options.circumference<2*Math.PI){var n=this.chart.options.rotation%(2*Math.PI);n+=2*Math.PI*(n>=Math.PI?-1:n<-Math.PI?1:0);var r=n+this.chart.options.circumference,l={x:Math.cos(n),y:Math.sin(n)},h={x:Math.cos(r),y:Math.sin(r)},c=0>=n&&r>=0||n<=2*Math.PI&&2*Math.PI<=r,u=n<=.5*Math.PI&&.5*Math.PI<=r||n<=2.5*Math.PI&&2.5*Math.PI<=r,d=n<=-Math.PI&&-Math.PI<=r||n<=Math.PI&&Math.PI<=r,f=n<=.5*-Math.PI&&.5*-Math.PI<=r||n<=1.5*Math.PI&&1.5*Math.PI<=r,g=this.chart.options.cutoutPercentage/100,m={x:d?-1:Math.min(l.x*(l.x<0?1:g),h.x*(h.x<0?1:g)),y:f?-1:Math.min(l.y*(l.y<0?1:g),h.y*(h.y<0?1:g))},p={x:c?1:Math.max(l.x*(l.x>0?1:g),h.x*(h.x>0?1:g)),y:u?1:Math.max(l.y*(l.y>0?1:g),h.y*(h.y>0?1:g))},b={width:.5*(p.x-m.x),height:.5*(p.y-m.y)};s=Math.min(i/b.width,a/b.height),o={x:(p.x+m.x)*-.5,y:(p.y+m.y)*-.5}}this.chart.outerRadius=Math.max(s/2,0),this.chart.innerRadius=Math.max(this.chart.options.cutoutPercentage?this.chart.outerRadius/100*this.chart.options.cutoutPercentage:1,0),this.chart.radiusLength=(this.chart.outerRadius-this.chart.innerRadius)/this.getVisibleDatasetCount(),this.chart.offsetX=o.x*this.chart.outerRadius,this.chart.offsetY=o.y*this.chart.outerRadius,this.getDataset().total=0,e.each(this.getDataset().data,function(t){isNaN(t)||(this.getDataset().total+=Math.abs(t))},this),this.outerRadius=this.chart.outerRadius-this.chart.radiusLength*this.getRingIndex(this.index),this.innerRadius=this.outerRadius-this.chart.radiusLength,e.each(this.getDataset().metaData,function(e,i){this.updateElement(e,i,t)},this)},updateElement:function(t,i,a){var s=(this.chart.chartArea.left+this.chart.chartArea.right)/2,o=(this.chart.chartArea.top+this.chart.chartArea.bottom)/2,n=this.chart.options.rotation||Math.PI*-.5,r=this.chart.options.rotation||Math.PI*-.5,l=a&&this.chart.options.animation.animateRotate?0:this.calculateCircumference(this.getDataset().data[i])*((this.chart.options.circumference||2*Math.PI)/(2*Math.PI)),h=a&&this.chart.options.animation.animateScale?0:this.innerRadius,c=a&&this.chart.options.animation.animateScale?0:this.outerRadius;e.extend(t,{_chart:this.chart.chart,_datasetIndex:this.index,_index:i,_model:{x:s+this.chart.offsetX,y:o+this.chart.offsetY,startAngle:n,endAngle:r,circumference:l,outerRadius:c,innerRadius:h,backgroundColor:t.custom&&t.custom.backgroundColor?t.custom.backgroundColor:e.getValueAtIndexOrDefault(this.getDataset().backgroundColor,i,this.chart.options.elements.arc.backgroundColor),hoverBackgroundColor:t.custom&&t.custom.hoverBackgroundColor?t.custom.hoverBackgroundColor:e.getValueAtIndexOrDefault(this.getDataset().hoverBackgroundColor,i,this.chart.options.elements.arc.hoverBackgroundColor),borderWidth:t.custom&&t.custom.borderWidth?t.custom.borderWidth:e.getValueAtIndexOrDefault(this.getDataset().borderWidth,i,this.chart.options.elements.arc.borderWidth),borderColor:t.custom&&t.custom.borderColor?t.custom.borderColor:e.getValueAtIndexOrDefault(this.getDataset().borderColor,i,this.chart.options.elements.arc.borderColor),label:e.getValueAtIndexOrDefault(this.getDataset().label,i,this.chart.data.labels[i])}}),a||(0===i?t._model.startAngle=this.chart.options.rotation||Math.PI*-.5:t._model.startAngle=this.getDataset().metaData[i-1]._model.endAngle,t._model.endAngle=t._model.startAngle+t._model.circumference),t.pivot()},draw:function(t){var i=t||1;e.each(this.getDataset().metaData,function(t,e){t.transition(i).draw()})},setHoverStyle:function(t){var i=this.chart.data.datasets[t._datasetIndex],a=t._index;t._model.backgroundColor=t.custom&&t.custom.hoverBackgroundColor?t.custom.hoverBackgroundColor:e.getValueAtIndexOrDefault(i.hoverBackgroundColor,a,e.color(t._model.backgroundColor).saturate(.5).darken(.1).rgbString()),t._model.borderColor=t.custom&&t.custom.hoverBorderColor?t.custom.hoverBorderColor:e.getValueAtIndexOrDefault(i.hoverBorderColor,a,e.color(t._model.borderColor).saturate(.5).darken(.1).rgbString()),t._model.borderWidth=t.custom&&t.custom.hoverBorderWidth?t.custom.hoverBorderWidth:e.getValueAtIndexOrDefault(i.hoverBorderWidth,a,t._model.borderWidth)},removeHoverStyle:function(t){var i=(this.chart.data.datasets[t._datasetIndex],t._index);t._model.backgroundColor=t.custom&&t.custom.backgroundColor?t.custom.backgroundColor:e.getValueAtIndexOrDefault(this.getDataset().backgroundColor,i,this.chart.options.elements.arc.backgroundColor),t._model.borderColor=t.custom&&t.custom.borderColor?t.custom.borderColor:e.getValueAtIndexOrDefault(this.getDataset().borderColor,i,this.chart.options.elements.arc.borderColor),t._model.borderWidth=t.custom&&t.custom.borderWidth?t.custom.borderWidth:e.getValueAtIndexOrDefault(this.getDataset().borderWidth,i,this.chart.options.elements.arc.borderWidth)},calculateCircumference:function(t){return this.getDataset().total>0&&!isNaN(t)?1.999999*Math.PI*(t/this.getDataset().total):0}})}},{}],18:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.line={showLines:!0,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}},t.controllers.line=t.DatasetController.extend({addElements:function(){this.getDataset().metaData=this.getDataset().metaData||[],this.getDataset().metaDataset=this.getDataset().metaDataset||new t.elements.Line({_chart:this.chart.chart,_datasetIndex:this.index,_points:this.getDataset().metaData}),e.each(this.getDataset().data,function(e,i){this.getDataset().metaData[i]=this.getDataset().metaData[i]||new t.elements.Point({_chart:this.chart.chart,_datasetIndex:this.index,_index:i})},this)},addElementAndReset:function(e){this.getDataset().metaData=this.getDataset().metaData||[];var i=new t.elements.Point({_chart:this.chart.chart,_datasetIndex:this.index,_index:e});this.updateElement(i,e,!0),this.getDataset().metaData.splice(e,0,i),this.chart.options.showLines&&0!==this.chart.options.elements.line.tension&&this.updateBezierControlPoints()},update:function(t){var i,a=this.getDataset().metaDataset,s=this.getDataset().metaData,o=this.getScaleForId(this.getDataset().yAxisID);this.getScaleForId(this.getDataset().xAxisID);i=o.min<0&&o.max<0?o.getPixelForValue(o.max):o.min>0&&o.max>0?o.getPixelForValue(o.min):o.getPixelForValue(0),this.chart.options.showLines&&(a._scale=o,a._datasetIndex=this.index,a._children=s,a._model={tension:a.custom&&a.custom.tension?a.custom.tension:e.getValueOrDefault(this.getDataset().tension,this.chart.options.elements.line.tension),backgroundColor:a.custom&&a.custom.backgroundColor?a.custom.backgroundColor:this.getDataset().backgroundColor||this.chart.options.elements.line.backgroundColor,borderWidth:a.custom&&a.custom.borderWidth?a.custom.borderWidth:this.getDataset().borderWidth||this.chart.options.elements.line.borderWidth,borderColor:a.custom&&a.custom.borderColor?a.custom.borderColor:this.getDataset().borderColor||this.chart.options.elements.line.borderColor,borderCapStyle:a.custom&&a.custom.borderCapStyle?a.custom.borderCapStyle:this.getDataset().borderCapStyle||this.chart.options.elements.line.borderCapStyle,borderDash:a.custom&&a.custom.borderDash?a.custom.borderDash:this.getDataset().borderDash||this.chart.options.elements.line.borderDash,borderDashOffset:a.custom&&a.custom.borderDashOffset?a.custom.borderDashOffset:this.getDataset().borderDashOffset||this.chart.options.elements.line.borderDashOffset,borderJoinStyle:a.custom&&a.custom.borderJoinStyle?a.custom.borderJoinStyle:this.getDataset().borderJoinStyle||this.chart.options.elements.line.borderJoinStyle,fill:a.custom&&a.custom.fill?a.custom.fill:void 0!==this.getDataset().fill?this.getDataset().fill:this.chart.options.elements.line.fill,scaleTop:o.top,scaleBottom:o.bottom,scaleZero:i},a.pivot()),e.each(s,function(e,i){this.updateElement(e,i,t)},this),this.chart.options.showLines&&0!==this.chart.options.elements.line.tension&&this.updateBezierControlPoints()},getPointBackgroundColor:function(t,i){var a=this.chart.options.elements.point.backgroundColor,s=this.getDataset();return t.custom&&t.custom.backgroundColor?a=t.custom.backgroundColor:s.pointBackgroundColor?a=e.getValueAtIndexOrDefault(s.pointBackgroundColor,i,a):s.backgroundColor&&(a=s.backgroundColor),a},getPointBorderColor:function(t,i){var a=this.chart.options.elements.point.borderColor,s=this.getDataset();return t.custom&&t.custom.borderColor?a=t.custom.borderColor:s.pointBorderColor?a=e.getValueAtIndexOrDefault(this.getDataset().pointBorderColor,i,a):s.borderColor&&(a=s.borderColor),a},getPointBorderWidth:function(t,i){var a=this.chart.options.elements.point.borderWidth,s=this.getDataset();return t.custom&&void 0!==t.custom.borderWidth?a=t.custom.borderWidth:void 0!==s.pointBorderWidth?a=e.getValueAtIndexOrDefault(s.pointBorderWidth,i,a):void 0!==s.borderWidth&&(a=s.borderWidth),a},updateElement:function(t,i,a){var s,o=this.getScaleForId(this.getDataset().yAxisID),n=this.getScaleForId(this.getDataset().xAxisID);s=o.min<0&&o.max<0?o.getPixelForValue(o.max):o.min>0&&o.max>0?o.getPixelForValue(o.min):o.getPixelForValue(0),t._chart=this.chart.chart,t._xScale=n,t._yScale=o,t._datasetIndex=this.index,t._index=i,t._model={x:n.getPixelForValue(this.getDataset().data[i],i,this.index,this.chart.isCombo),y:a?s:this.calculatePointY(this.getDataset().data[i],i,this.index,this.chart.isCombo),tension:t.custom&&t.custom.tension?t.custom.tension:e.getValueOrDefault(this.getDataset().tension,this.chart.options.elements.line.tension),radius:t.custom&&t.custom.radius?t.custom.radius:e.getValueAtIndexOrDefault(this.getDataset().radius,i,this.chart.options.elements.point.radius),pointStyle:t.custom&&t.custom.pointStyle?t.custom.pointStyle:e.getValueAtIndexOrDefault(this.getDataset().pointStyle,i,this.chart.options.elements.point.pointStyle),backgroundColor:this.getPointBackgroundColor(t,i),borderColor:this.getPointBorderColor(t,i),borderWidth:this.getPointBorderWidth(t,i),hitRadius:t.custom&&t.custom.hitRadius?t.custom.hitRadius:e.getValueAtIndexOrDefault(this.getDataset().hitRadius,i,this.chart.options.elements.point.hitRadius)},t._model.skip=t.custom&&t.custom.skip?t.custom.skip:isNaN(t._model.x)||isNaN(t._model.y)},calculatePointY:function(t,i,a,s){var o=(this.getScaleForId(this.getDataset().xAxisID),this.getScaleForId(this.getDataset().yAxisID));if(o.options.stacked){for(var n=0,r=0,l=0;a>l;l++){var h=this.chart.data.datasets[l];"line"===h.type&&e.isDatasetVisible(h)&&(h.data[i]<0?r+=h.data[i]||0:n+=h.data[i]||0)}return 0>t?o.getPixelForValue(r+t):o.getPixelForValue(n+t)}return o.getPixelForValue(t)},updateBezierControlPoints:function(){e.each(this.getDataset().metaData,function(t,i){var a=e.splineCurve(e.previousItem(this.getDataset().metaData,i)._model,t._model,e.nextItem(this.getDataset().metaData,i)._model,t._model.tension);t._model.controlPointPreviousX=Math.max(Math.min(a.previous.x,this.chart.chartArea.right),this.chart.chartArea.left),t._model.controlPointPreviousY=Math.max(Math.min(a.previous.y,this.chart.chartArea.bottom),this.chart.chartArea.top),t._model.controlPointNextX=Math.max(Math.min(a.next.x,this.chart.chartArea.right),this.chart.chartArea.left),t._model.controlPointNextY=Math.max(Math.min(a.next.y,this.chart.chartArea.bottom),this.chart.chartArea.top),t.pivot()},this)},draw:function(t){var i=t||1;e.each(this.getDataset().metaData,function(t){t.transition(i)}),this.chart.options.showLines&&this.getDataset().metaDataset.transition(i).draw(),e.each(this.getDataset().metaData,function(t){t.draw()})},setHoverStyle:function(t){var i=this.chart.data.datasets[t._datasetIndex],a=t._index;t._model.radius=t.custom&&t.custom.hoverRadius?t.custom.hoverRadius:e.getValueAtIndexOrDefault(i.pointHoverRadius,a,this.chart.options.elements.point.hoverRadius),t._model.backgroundColor=t.custom&&t.custom.hoverBackgroundColor?t.custom.hoverBackgroundColor:e.getValueAtIndexOrDefault(i.pointHoverBackgroundColor,a,e.color(t._model.backgroundColor).saturate(.5).darken(.1).rgbString()),t._model.borderColor=t.custom&&t.custom.hoverBorderColor?t.custom.hoverBorderColor:e.getValueAtIndexOrDefault(i.pointHoverBorderColor,a,e.color(t._model.borderColor).saturate(.5).darken(.1).rgbString()),t._model.borderWidth=t.custom&&t.custom.hoverBorderWidth?t.custom.hoverBorderWidth:e.getValueAtIndexOrDefault(i.pointHoverBorderWidth,a,t._model.borderWidth)},removeHoverStyle:function(t){var i=(this.chart.data.datasets[t._datasetIndex],t._index);t._model.radius=t.custom&&t.custom.radius?t.custom.radius:e.getValueAtIndexOrDefault(this.getDataset().radius,i,this.chart.options.elements.point.radius),t._model.backgroundColor=this.getPointBackgroundColor(t,i),t._model.borderColor=this.getPointBorderColor(t,i),t._model.borderWidth=this.getPointBorderWidth(t,i)}})}},{}],19:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.polarArea={scale:{type:"radialLinear",lineArc:!0},animateRotate:!0,animateScale:!0,aspectRatio:1,legendCallback:function(t){var e=[];if(e.push('
    '),t.data.datasets.length)for(var i=0;i'),t.data.labels[i]&&e.push(t.data.labels[i]),e.push("");return e.push("
"),e.join("")},legend:{labels:{generateLabels:function(t){return t.labels.length&&t.datasets.length?t.labels.map(function(e,i){return{text:e,fillStyle:t.datasets[0].backgroundColor[i],hidden:isNaN(t.datasets[0].data[i]),index:i}}):[]}},onClick:function(t,i){e.each(this.chart.data.datasets,function(t){t.metaHiddenData=t.metaHiddenData||[];var e=i.index;isNaN(t.data[e])?isNaN(t.metaHiddenData[e])||(t.data[e]=t.metaHiddenData[e]):(t.metaHiddenData[e]=t.data[e],t.data[e]=NaN)}),this.chart.update()}},tooltips:{callbacks:{title:function(){return""},label:function(t,e){return e.labels[t.index]+": "+t.yLabel}}}},t.controllers.polarArea=t.DatasetController.extend({linkScales:function(){},addElements:function(){this.getDataset().metaData=this.getDataset().metaData||[],e.each(this.getDataset().data,function(e,i){this.getDataset().metaData[i]=this.getDataset().metaData[i]||new t.elements.Arc({_chart:this.chart.chart,_datasetIndex:this.index,_index:i})},this)},addElementAndReset:function(e){this.getDataset().metaData=this.getDataset().metaData||[];var i=new t.elements.Arc({_chart:this.chart.chart,_datasetIndex:this.index,_index:e});this.updateElement(i,e,!0),this.getDataset().metaData.splice(e,0,i)},getVisibleDatasetCount:function(){return e.where(this.chart.data.datasets,function(t){return e.isDatasetVisible(t)}).length},update:function(t){var i=Math.min(this.chart.chartArea.right-this.chart.chartArea.left,this.chart.chartArea.bottom-this.chart.chartArea.top);this.chart.outerRadius=Math.max((i-this.chart.options.elements.arc.borderWidth/2)/2,0),this.chart.innerRadius=Math.max(this.chart.options.cutoutPercentage?this.chart.outerRadius/100*this.chart.options.cutoutPercentage:1,0),this.chart.radiusLength=(this.chart.outerRadius-this.chart.innerRadius)/this.getVisibleDatasetCount(),this.getDataset().total=0,e.each(this.getDataset().data,function(t){this.getDataset().total+=Math.abs(t)},this),this.outerRadius=this.chart.outerRadius-this.chart.radiusLength*this.index,this.innerRadius=this.outerRadius-this.chart.radiusLength,e.each(this.getDataset().metaData,function(e,i){this.updateElement(e,i,t)},this)},updateElement:function(t,i,a){for(var s=this.calculateCircumference(this.getDataset().data[i]),o=(this.chart.chartArea.left+this.chart.chartArea.right)/2,n=(this.chart.chartArea.top+this.chart.chartArea.bottom)/2,r=0,l=0;i>l;++l)isNaN(this.getDataset().data[l])||++r; +var h=-.5*Math.PI+s*r,c=h+s,u={x:o,y:n,innerRadius:0,outerRadius:this.chart.options.animateScale?0:this.chart.scale.getDistanceFromCenterForValue(this.getDataset().data[i]),startAngle:this.chart.options.animateRotate?Math.PI*-.5:h,endAngle:this.chart.options.animateRotate?Math.PI*-.5:c,backgroundColor:t.custom&&t.custom.backgroundColor?t.custom.backgroundColor:e.getValueAtIndexOrDefault(this.getDataset().backgroundColor,i,this.chart.options.elements.arc.backgroundColor),borderWidth:t.custom&&t.custom.borderWidth?t.custom.borderWidth:e.getValueAtIndexOrDefault(this.getDataset().borderWidth,i,this.chart.options.elements.arc.borderWidth),borderColor:t.custom&&t.custom.borderColor?t.custom.borderColor:e.getValueAtIndexOrDefault(this.getDataset().borderColor,i,this.chart.options.elements.arc.borderColor),label:e.getValueAtIndexOrDefault(this.chart.data.labels,i,this.chart.data.labels[i])};e.extend(t,{_chart:this.chart.chart,_datasetIndex:this.index,_index:i,_scale:this.chart.scale,_model:a?u:{x:o,y:n,innerRadius:0,outerRadius:this.chart.scale.getDistanceFromCenterForValue(this.getDataset().data[i]),startAngle:h,endAngle:c,backgroundColor:t.custom&&t.custom.backgroundColor?t.custom.backgroundColor:e.getValueAtIndexOrDefault(this.getDataset().backgroundColor,i,this.chart.options.elements.arc.backgroundColor),borderWidth:t.custom&&t.custom.borderWidth?t.custom.borderWidth:e.getValueAtIndexOrDefault(this.getDataset().borderWidth,i,this.chart.options.elements.arc.borderWidth),borderColor:t.custom&&t.custom.borderColor?t.custom.borderColor:e.getValueAtIndexOrDefault(this.getDataset().borderColor,i,this.chart.options.elements.arc.borderColor),label:e.getValueAtIndexOrDefault(this.chart.data.labels,i,this.chart.data.labels[i])}}),t.pivot()},draw:function(t){var i=t||1;e.each(this.getDataset().metaData,function(t,e){t.transition(i).draw()})},setHoverStyle:function(t){var i=this.chart.data.datasets[t._datasetIndex],a=t._index;t._model.backgroundColor=t.custom&&t.custom.hoverBackgroundColor?t.custom.hoverBackgroundColor:e.getValueAtIndexOrDefault(i.hoverBackgroundColor,a,e.color(t._model.backgroundColor).saturate(.5).darken(.1).rgbString()),t._model.borderColor=t.custom&&t.custom.hoverBorderColor?t.custom.hoverBorderColor:e.getValueAtIndexOrDefault(i.hoverBorderColor,a,e.color(t._model.borderColor).saturate(.5).darken(.1).rgbString()),t._model.borderWidth=t.custom&&t.custom.hoverBorderWidth?t.custom.hoverBorderWidth:e.getValueAtIndexOrDefault(i.hoverBorderWidth,a,t._model.borderWidth)},removeHoverStyle:function(t){var i=(this.chart.data.datasets[t._datasetIndex],t._index);t._model.backgroundColor=t.custom&&t.custom.backgroundColor?t.custom.backgroundColor:e.getValueAtIndexOrDefault(this.getDataset().backgroundColor,i,this.chart.options.elements.arc.backgroundColor),t._model.borderColor=t.custom&&t.custom.borderColor?t.custom.borderColor:e.getValueAtIndexOrDefault(this.getDataset().borderColor,i,this.chart.options.elements.arc.borderColor),t._model.borderWidth=t.custom&&t.custom.borderWidth?t.custom.borderWidth:e.getValueAtIndexOrDefault(this.getDataset().borderWidth,i,this.chart.options.elements.arc.borderWidth)},calculateCircumference:function(t){if(isNaN(t))return 0;var i=e.where(this.getDataset().data,function(t){return isNaN(t)}).length;return 2*Math.PI/(this.getDataset().data.length-i)}})}},{}],20:[function(t,e,i){"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({linkScales:function(){},addElements:function(){this.getDataset().metaData=this.getDataset().metaData||[],this.getDataset().metaDataset=this.getDataset().metaDataset||new t.elements.Line({_chart:this.chart.chart,_datasetIndex:this.index,_points:this.getDataset().metaData,_loop:!0}),e.each(this.getDataset().data,function(e,i){this.getDataset().metaData[i]=this.getDataset().metaData[i]||new t.elements.Point({_chart:this.chart.chart,_datasetIndex:this.index,_index:i,_model:{x:0,y:0}})},this)},addElementAndReset:function(e){this.getDataset().metaData=this.getDataset().metaData||[];var i=new t.elements.Point({_chart:this.chart.chart,_datasetIndex:this.index,_index:e});this.updateElement(i,e,!0),this.getDataset().metaData.splice(e,0,i),this.updateBezierControlPoints()},update:function(t){var i,a=this.getDataset().metaDataset,s=this.getDataset().metaData,o=this.chart.scale;i=o.min<0&&o.max<0?o.getPointPositionForValue(0,o.max):o.min>0&&o.max>0?o.getPointPositionForValue(0,o.min):o.getPointPositionForValue(0,0),e.extend(this.getDataset().metaDataset,{_datasetIndex:this.index,_children:this.getDataset().metaData,_model:{tension:a.custom&&a.custom.tension?a.custom.tension:e.getValueOrDefault(this.getDataset().tension,this.chart.options.elements.line.tension),backgroundColor:a.custom&&a.custom.backgroundColor?a.custom.backgroundColor:this.getDataset().backgroundColor||this.chart.options.elements.line.backgroundColor,borderWidth:a.custom&&a.custom.borderWidth?a.custom.borderWidth:this.getDataset().borderWidth||this.chart.options.elements.line.borderWidth,borderColor:a.custom&&a.custom.borderColor?a.custom.borderColor:this.getDataset().borderColor||this.chart.options.elements.line.borderColor,fill:a.custom&&a.custom.fill?a.custom.fill:void 0!==this.getDataset().fill?this.getDataset().fill:this.chart.options.elements.line.fill,borderCapStyle:a.custom&&a.custom.borderCapStyle?a.custom.borderCapStyle:this.getDataset().borderCapStyle||this.chart.options.elements.line.borderCapStyle,borderDash:a.custom&&a.custom.borderDash?a.custom.borderDash:this.getDataset().borderDash||this.chart.options.elements.line.borderDash,borderDashOffset:a.custom&&a.custom.borderDashOffset?a.custom.borderDashOffset:this.getDataset().borderDashOffset||this.chart.options.elements.line.borderDashOffset,borderJoinStyle:a.custom&&a.custom.borderJoinStyle?a.custom.borderJoinStyle:this.getDataset().borderJoinStyle||this.chart.options.elements.line.borderJoinStyle,scaleTop:o.top,scaleBottom:o.bottom,scaleZero:i}}),this.getDataset().metaDataset.pivot(),e.each(s,function(e,i){this.updateElement(e,i,t)},this),this.updateBezierControlPoints()},updateElement:function(t,i,a){var s=this.chart.scale.getPointPositionForValue(i,this.getDataset().data[i]);e.extend(t,{_datasetIndex:this.index,_index:i,_scale:this.chart.scale,_model:{x:a?this.chart.scale.xCenter:s.x,y:a?this.chart.scale.yCenter:s.y,tension:t.custom&&t.custom.tension?t.custom.tension:e.getValueOrDefault(this.getDataset().tension,this.chart.options.elements.line.tension),radius:t.custom&&t.custom.radius?t.custom.radius:e.getValueAtIndexOrDefault(this.getDataset().pointRadius,i,this.chart.options.elements.point.radius),backgroundColor:t.custom&&t.custom.backgroundColor?t.custom.backgroundColor:e.getValueAtIndexOrDefault(this.getDataset().pointBackgroundColor,i,this.chart.options.elements.point.backgroundColor),borderColor:t.custom&&t.custom.borderColor?t.custom.borderColor:e.getValueAtIndexOrDefault(this.getDataset().pointBorderColor,i,this.chart.options.elements.point.borderColor),borderWidth:t.custom&&t.custom.borderWidth?t.custom.borderWidth:e.getValueAtIndexOrDefault(this.getDataset().pointBorderWidth,i,this.chart.options.elements.point.borderWidth),pointStyle:t.custom&&t.custom.pointStyle?t.custom.pointStyle:e.getValueAtIndexOrDefault(this.getDataset().pointStyle,i,this.chart.options.elements.point.pointStyle),hitRadius:t.custom&&t.custom.hitRadius?t.custom.hitRadius:e.getValueAtIndexOrDefault(this.getDataset().hitRadius,i,this.chart.options.elements.point.hitRadius)}}),t._model.skip=t.custom&&t.custom.skip?t.custom.skip:isNaN(t._model.x)||isNaN(t._model.y)},updateBezierControlPoints:function(){e.each(this.getDataset().metaData,function(t,i){var a=e.splineCurve(e.previousItem(this.getDataset().metaData,i,!0)._model,t._model,e.nextItem(this.getDataset().metaData,i,!0)._model,t._model.tension);t._model.controlPointPreviousX=Math.max(Math.min(a.previous.x,this.chart.chartArea.right),this.chart.chartArea.left),t._model.controlPointPreviousY=Math.max(Math.min(a.previous.y,this.chart.chartArea.bottom),this.chart.chartArea.top),t._model.controlPointNextX=Math.max(Math.min(a.next.x,this.chart.chartArea.right),this.chart.chartArea.left),t._model.controlPointNextY=Math.max(Math.min(a.next.y,this.chart.chartArea.bottom),this.chart.chartArea.top),t.pivot()},this)},draw:function(t){var i=t||1;e.each(this.getDataset().metaData,function(t,e){t.transition(i)}),this.getDataset().metaDataset.transition(i).draw(),e.each(this.getDataset().metaData,function(t){t.draw()})},setHoverStyle:function(t){var i=this.chart.data.datasets[t._datasetIndex],a=t._index;t._model.radius=t.custom&&t.custom.hoverRadius?t.custom.hoverRadius:e.getValueAtIndexOrDefault(i.pointHoverRadius,a,this.chart.options.elements.point.hoverRadius),t._model.backgroundColor=t.custom&&t.custom.hoverBackgroundColor?t.custom.hoverBackgroundColor:e.getValueAtIndexOrDefault(i.pointHoverBackgroundColor,a,e.color(t._model.backgroundColor).saturate(.5).darken(.1).rgbString()),t._model.borderColor=t.custom&&t.custom.hoverBorderColor?t.custom.hoverBorderColor:e.getValueAtIndexOrDefault(i.pointHoverBorderColor,a,e.color(t._model.borderColor).saturate(.5).darken(.1).rgbString()),t._model.borderWidth=t.custom&&t.custom.hoverBorderWidth?t.custom.hoverBorderWidth:e.getValueAtIndexOrDefault(i.pointHoverBorderWidth,a,t._model.borderWidth)},removeHoverStyle:function(t){var i=(this.chart.data.datasets[t._datasetIndex],t._index);t._model.radius=t.custom&&t.custom.radius?t.custom.radius:e.getValueAtIndexOrDefault(this.getDataset().radius,i,this.chart.options.elements.point.radius),t._model.backgroundColor=t.custom&&t.custom.backgroundColor?t.custom.backgroundColor:e.getValueAtIndexOrDefault(this.getDataset().pointBackgroundColor,i,this.chart.options.elements.point.backgroundColor),t._model.borderColor=t.custom&&t.custom.borderColor?t.custom.borderColor:e.getValueAtIndexOrDefault(this.getDataset().pointBorderColor,i,this.chart.options.elements.point.borderColor),t._model.borderWidth=t.custom&&t.custom.borderWidth?t.custom.borderWidth:e.getValueAtIndexOrDefault(this.getDataset().pointBorderWidth,i,this.chart.options.elements.point.borderWidth)}})}},{}],21:[function(t,e,i){"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,a){a||(t.animating=!0);for(var s=0;s1&&(e=Math.floor(this.dropFrames),this.dropFrames=this.dropFrames%1);for(var i=0;ithis.animations[i].animationObject.numSteps&&(this.animations[i].animationObject.currentStep=this.animations[i].animationObject.numSteps),this.animations[i].animationObject.render(this.animations[i].chartInstance,this.animations[i].animationObject),this.animations[i].animationObject.onAnimationProgress&&this.animations[i].animationObject.onAnimationProgress.call&&this.animations[i].animationObject.onAnimationProgress.call(this.animations[i].chartInstance,this.animations[i]),this.animations[i].animationObject.currentStep===this.animations[i].animationObject.numSteps?(this.animations[i].animationObject.onAnimationComplete&&this.animations[i].animationObject.onAnimationComplete.call&&this.animations[i].animationObject.onAnimationComplete.call(this.animations[i].chartInstance,this.animations[i]),this.animations[i].chartInstance.animating=!1,this.animations.splice(i,1)):++i;var a=Date.now(),s=(a-t)/this.frameDuration;this.dropFrames+=s,this.animations.length>0&&this.requestAnimationFrame()}}}},{}],22:[function(t,e,i){"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(){return this.bindEvents(),this.ensureScalesHaveIDs(),this.buildOrUpdateControllers(),this.buildScales(),this.buildSurroundingItems(),this.updateLayout(),this.resetElements(),this.initToolTip(),this.update(),this},clear:function(){return e.clear(this.chart),this},stop:function(){return t.animationService.cancelAnimation(this),this},resize:function(t){var i=this.chart.canvas,a=e.getMaximumWidth(this.chart.canvas),s=this.options.maintainAspectRatio&&isNaN(this.chart.aspectRatio)===!1&&isFinite(this.chart.aspectRatio)&&0!==this.chart.aspectRatio?a/this.chart.aspectRatio:e.getMaximumHeight(this.chart.canvas),o=this.chart.width!==a||this.chart.height!==s;return o?(i.width=this.chart.width=a,i.height=this.chart.height=s,e.retinaScale(this.chart),t||(this.stop(),this.update(this.options.responsiveAnimationDuration)),this):this},ensureScalesHaveIDs:function(){var t="x-axis-",i="y-axis-";this.options.scales&&(this.options.scales.xAxes&&this.options.scales.xAxes.length&&e.each(this.options.scales.xAxes,function(e,i){e.id=e.id||t+i}),this.options.scales.yAxes&&this.options.scales.yAxes.length&&e.each(this.options.scales.yAxes,function(t,e){t.id=t.id||i+e}))},buildScales:function(){if(this.scales={},this.options.scales&&(this.options.scales.xAxes&&this.options.scales.xAxes.length&&e.each(this.options.scales.xAxes,function(i,a){var s=e.getValueOrDefault(i.type,"category"),o=t.scaleService.getScaleConstructor(s);if(o){var n=new o({ctx:this.chart.ctx,options:i,chart:this,id:i.id});this.scales[n.id]=n}},this),this.options.scales.yAxes&&this.options.scales.yAxes.length&&e.each(this.options.scales.yAxes,function(i,a){var s=e.getValueOrDefault(i.type,"linear"),o=t.scaleService.getScaleConstructor(s);if(o){var n=new o({ctx:this.chart.ctx,options:i,chart:this,id:i.id});this.scales[n.id]=n}},this)),this.options.scale){var i=t.scaleService.getScaleConstructor(this.options.scale.type);if(i){var a=new i({ctx:this.chart.ctx,options:this.options.scale,chart:this});this.scale=a,this.scales.radialScale=a}}t.scaleService.addScalesToLayout(this)},buildSurroundingItems:function(){this.options.title&&(this.titleBlock=new t.Title({ctx:this.chart.ctx,options:this.options.title,chart:this}),t.layoutService.addBox(this,this.titleBlock)),this.options.legend&&(this.legend=new t.Legend({ctx:this.chart.ctx,options:this.options.legend,chart:this}),t.layoutService.addBox(this,this.legend))},updateLayout:function(){t.layoutService.update(this,this.chart.width,this.chart.height)},buildOrUpdateControllers:function(){var i=[],a=[];if(e.each(this.data.datasets,function(e,s){e.type||(e.type=this.config.type);var o=e.type;i.push(o),e.controller?e.controller.updateIndex(s):(e.controller=new t.controllers[o](this,s),a.push(e.controller))},this),i.length>1)for(var s=1;s0&&(e=this.data.datasets[e[0]._datasetIndex].metaData),e},generateLegend:function(){return this.options.legendCallback(this)},destroy:function(){this.clear(),e.unbindEvents(this,this.events),e.removeResizeListener(this.chart.canvas.parentNode);var i=this.chart.canvas;i.width=this.chart.width,i.height=this.chart.height,void 0!==this.chart.originalDevicePixelRatio&&this.chart.ctx.scale(1/this.chart.originalDevicePixelRatio,1/this.chart.originalDevicePixelRatio),i.style.width=this.chart.originalCanvasStyleWidth,i.style.height=this.chart.originalCanvasStyleHeight,delete t.instances[this.id]},toBase64Image:function(){return this.chart.canvas.toDataURL.apply(this.chart.canvas,arguments)},initToolTip:function(){this.tooltip=new t.Tooltip({_chart:this.chart,_chartInstance:this,_data:this.data,_options:this.options},this)},bindEvents:function(){e.bindEvents(this,this.options.events,function(t){this.eventHandler(t)})},eventHandler:function(t){if(this.lastActive=this.lastActive||[],this.lastTooltipActive=this.lastTooltipActive||[],"mouseout"===t.type)this.active=[],this.tooltipActive=[];else{var i=this,a=function(e){switch(e){case"single":return i.getElementAtEvent(t);case"label":return i.getElementsAtEvent(t);case"dataset":return i.getDatasetAtEvent(t);default:return t}};this.active=a(this.options.hover.mode),this.tooltipActive=a(this.options.tooltips.mode)}this.options.hover.onHover&&this.options.hover.onHover.call(this,this.active),("mouseup"===t.type||"click"===t.type)&&(this.options.onClick&&this.options.onClick.call(this,t,this.active),this.legend&&this.legend.handleEvent&&this.legend.handleEvent(t));if(this.lastActive.length)switch(this.options.hover.mode){case"single":this.data.datasets[this.lastActive[0]._datasetIndex].controller.removeHoverStyle(this.lastActive[0],this.lastActive[0]._datasetIndex,this.lastActive[0]._index);break;case"label":case"dataset":for(var s=0;st)this.getDataset().metaData.splice(t,e-t);else if(t>e)for(var i=e;t>i;++i)this.addElementAndReset(i)},addElements:e.noop,addElementAndReset:e.noop,draw:e.noop,removeHoverStyle:e.noop,setHoverStyle:e.noop,update:e.noop}),t.DatasetController.extend=e.inherits}},{}],24:[function(t,e,i){"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(){},pivot:function(){return this._view||(this._view=e.clone(this._model)),this._start=e.clone(this._view),this},transition:function(t){return this._view||(this._view=e.clone(this._model)),1===t?(this._view=this._model,this._start=null,this):(this._start||this.pivot(),e.each(this._model,function(i,a){if("_"!==a[0]&&this._model.hasOwnProperty(a))if(this._view.hasOwnProperty(a))if(i===this._view[a]);else if("string"==typeof i)try{var s=e.color(this._start[a]).mix(e.color(this._model[a]),t);this._view[a]=s.rgbString()}catch(o){this._view[a]=i}else if("number"==typeof i){var n=void 0!==this._start[a]&&isNaN(this._start[a])===!1?this._start[a]:0;this._view[a]=(this._model[a]-n)*t+n}else this._view[a]=i;else"number"!=typeof i||isNaN(this._view[a])?this._view[a]=i:this._view[a]=i*t;else;},this),this)},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}},{}],25:[function(t,e,i){"use strict";var a=t("chartjs-color");e.exports=function(t){function e(t,e,i){var a;return"string"==typeof t?(a=parseInt(t,10),-1!=t.indexOf("%")&&(a=a/100*e.parentNode[i])):a=t,a}function i(t,i,a){var s,o=document.defaultView.getComputedStyle(t)[i],n=document.defaultView.getComputedStyle(t.parentNode)[i],r=null!==o&&"none"!==o,l=null!==n&&"none"!==n;return(r||l)&&(s=Math.min(r?e(o,t,a):Number.POSITIVE_INFINITY,l?e(n,t.parentNode,a):Number.POSITIVE_INFINITY)),s}var s=t.helpers={};s.each=function(t,e,i,a){var o,n;if(s.isArray(t))if(n=t.length,a)for(o=n-1;o>=0;o--)e.call(i,t[o],o);else for(o=0;n>o;o++)e.call(i,t[o],o);else if("object"==typeof t){var r=Object.keys(t);for(n=r.length,o=0;n>o;o++)e.call(i,t[r[o]],r[o])}},s.clone=function(t){var e={};return s.each(t,function(i,a){t.hasOwnProperty(a)&&(s.isArray(i)?e[a]=i.slice(0):"object"==typeof i&&null!==i?e[a]=s.clone(i):e[a]=i)}),e},s.extend=function(t){for(var e=arguments.length,i=[],a=1;e>a;a++)i.push(arguments[a]);return s.each(i,function(e){s.each(e,function(i,a){e.hasOwnProperty(a)&&(t[a]=i)})}),t},s.configMerge=function(e){var i=s.clone(e);return s.each(Array.prototype.slice.call(arguments,1),function(e){s.each(e,function(a,o){if(e.hasOwnProperty(o))if("scales"===o)i[o]=s.scaleMerge(i.hasOwnProperty(o)?i[o]:{},a);else if("scale"===o)i[o]=s.configMerge(i.hasOwnProperty(o)?i[o]:{},t.scaleService.getScaleDefaults(a.type),a);else if(i.hasOwnProperty(o)&&s.isArray(i[o])&&s.isArray(a)){var n=i[o];s.each(a,function(t,e){e=a[o].length||!a[o][i].type?a[o].push(s.configMerge(r,e)):e.type&&e.type!==a[o][i].type?a[o][i]=s.configMerge(a[o][i],r,e):a[o][i]=s.configMerge(a[o][i],e)}):(a[o]=[],s.each(e,function(e){var i=s.getValueOrDefault(e.type,"xAxes"===o?"category":"linear");a[o].push(s.configMerge(t.scaleService.getScaleDefaults(i),e))})):a.hasOwnProperty(o)&&"object"==typeof a[o]&&null!==a[o]&&"object"==typeof e?a[o]=s.configMerge(a[o],e):a[o]=e)}),a},s.getValueAtIndexOrDefault=function(t,e,i){return void 0===t||null===t?i:s.isArray(t)?e=0;a--){var s=t[a];if(e(s))return s}},s.inherits=function(t){var e=this,i=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},a=function(){this.constructor=i};return a.prototype=e.prototype,i.prototype=new a,i.extend=s.inherits,t&&s.extend(i.prototype,t),i.__super__=e.prototype,i},s.noop=function(){},s.uid=function(){var t=0;return function(){return"chart-"+t++}}(),s.warn=function(t){console&&"function"==typeof console.warn&&console.warn(t)},s.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},s.almostEquals=function(t,e,i){return Math.abs(t-e)0?1:-1)},s.log10=function(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10},s.toRadians=function(t){return t*(Math.PI/180)},s.toDegrees=function(t){return t*(180/Math.PI)},s.getAngleFromPoint=function(t,e){var i=e.x-t.x,a=e.y-t.y,s=Math.sqrt(i*i+a*a),o=Math.atan2(a,i);return o<-.5*Math.PI&&(o+=2*Math.PI),{angle:o,distance:s}},s.aliasPixel=function(t){return t%2===0?0:.5},s.splineCurve=function(t,e,i,a){var s=t.skip?e:t,o=e,n=i.skip?e:i,r=Math.sqrt(Math.pow(o.x-s.x,2)+Math.pow(o.y-s.y,2)),l=Math.sqrt(Math.pow(n.x-o.x,2)+Math.pow(n.y-o.y,2)),h=r/(r+l),c=l/(r+l);h=isNaN(h)?0:h,c=isNaN(c)?0:c;var u=a*h,d=a*c;return{previous:{x:o.x-u*(n.x-s.x),y:o.y-u*(n.y-s.y)},next:{x:o.x+d*(n.x-s.x),y:o.y+d*(n.y-s.y)}}},s.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]},s.previousItem=function(t,e,i){return i?0>=e?t[t.length-1]:t[e-1]:0>=e?t[0]:t[e-1]},s.niceNum=function(t,e){var i,a=Math.floor(s.log10(t)),o=t/Math.pow(10,a);return i=e?1.5>o?1:3>o?2:7>o?5:10:1>=o?1:2>=o?2:5>=o?5:10,i*Math.pow(10,a)};var o=s.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:-0.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:-0.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-0.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?-0.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,i=0,a=1;return 0===t?0:1===(t/=1)?1:(i||(i=.3),at?-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((1*t-e)*(2*Math.PI)/i)):a*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-o.easeOutBounce(1-t)},easeOutBounce:function(t){return(t/=1)<1/2.75?1*(7.5625*t*t):2/2.75>t?1*(7.5625*(t-=1.5/2.75)*t+.75):2.5/2.75>t?1*(7.5625*(t-=2.25/2.75)*t+.9375):1*(7.5625*(t-=2.625/2.75)*t+.984375)},easeInOutBounce:function(t){return.5>t?.5*o.easeInBounce(2*t):.5*o.easeOutBounce(2*t-1)+.5}};s.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){ +return window.setTimeout(t,1e3/60)}}(),s.cancelAnimFrame=function(){return window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||function(t){return window.clearTimeout(t,1e3/60)}}(),s.getRelativePosition=function(t,e){var i,a,o=t.originalEvent||t,n=t.currentTarget||t.srcElement,r=n.getBoundingClientRect();o.touches&&o.touches.length>0?(i=o.touches[0].clientX,a=o.touches[0].clientY):(i=o.clientX,a=o.clientY);var l=parseFloat(s.getStyle(n,"padding-left")),h=parseFloat(s.getStyle(n,"padding-top")),c=parseFloat(s.getStyle(n,"padding-right")),u=parseFloat(s.getStyle(n,"padding-bottom")),d=r.right-r.left-l-c,f=r.bottom-r.top-h-u;return i=Math.round((i-r.left-l)/d*n.width/e.currentDevicePixelRatio),a=Math.round((a-r.top-h)/f*n.height/e.currentDevicePixelRatio),{x:i,y:a}},s.addEvent=function(t,e,i){t.addEventListener?t.addEventListener(e,i):t.attachEvent?t.attachEvent("on"+e,i):t["on"+e]=i},s.removeEvent=function(t,e,i){t.removeEventListener?t.removeEventListener(e,i,!1):t.detachEvent?t.detachEvent("on"+e,i):t["on"+e]=s.noop},s.bindEvents=function(t,e,i){t.events||(t.events={}),s.each(e,function(e){t.events[e]=function(){i.apply(t,arguments)},s.addEvent(t.chart.canvas,e,t.events[e])})},s.unbindEvents=function(t,e){s.each(e,function(e,i){s.removeEvent(t.chart.canvas,i,e)})},s.getConstraintWidth=function(t){return i(t,"max-width","clientWidth")},s.getConstraintHeight=function(t){return i(t,"max-height","clientHeight")},s.getMaximumWidth=function(t){var e=t.parentNode,i=parseInt(s.getStyle(e,"padding-left"))+parseInt(s.getStyle(e,"padding-right")),a=e.clientWidth-i,o=s.getConstraintWidth(t);return void 0!==o&&(a=Math.min(a,o)),a},s.getMaximumHeight=function(t){var e=t.parentNode,i=parseInt(s.getStyle(e,"padding-top"))+parseInt(s.getStyle(e,"padding-bottom")),a=e.clientHeight-i,o=s.getConstraintHeight(t);return void 0!==o&&(a=Math.min(a,o)),a},s.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},s.retinaScale=function(t){var e=t.ctx,i=t.canvas.width,a=t.canvas.height,s=t.currentDevicePixelRatio=window.devicePixelRatio||1;1!==s&&(e.canvas.height=a*s,e.canvas.width=i*s,e.scale(s,s),t.originalDevicePixelRatio=t.originalDevicePixelRatio||s),e.canvas.style.width=i+"px",e.canvas.style.height=a+"px"},s.clear=function(t){t.ctx.clearRect(0,0,t.width,t.height)},s.fontString=function(t,e,i){return e+" "+t+"px "+i},s.longestText=function(t,e,i,a){a=a||{},a.data=a.data||{},a.garbageCollect=a.garbageCollect||[],a.font!==e&&(a.data={},a.garbageCollect=[],a.font=e),t.font=e;var o=0;s.each(i,function(e){if(void 0!==e&&null!==e){var i=a.data[e];i||(i=a.data[e]=t.measureText(e).width,a.garbageCollect.push(e)),i>o&&(o=i)}});var n=a.garbageCollect.length/2;if(n>i.length){for(var r=0;n>r;r++)delete a.data[a.garbageCollect[r]];a.garbageCollect.splice(0,n)}return o},s.drawRoundedRectangle=function(t,e,i,a,s,o){t.beginPath(),t.moveTo(e+o,i),t.lineTo(e+a-o,i),t.quadraticCurveTo(e+a,i,e+a,i+o),t.lineTo(e+a,i+s-o),t.quadraticCurveTo(e+a,i+s,e+a-o,i+s),t.lineTo(e+o,i+s),t.quadraticCurveTo(e,i+s,e,i+s-o),t.lineTo(e,i+o),t.quadraticCurveTo(e,i,e+o,i),t.closePath()},s.color=function(e){return a?a(e instanceof CanvasGradient?t.defaults.global.defaultColor:e):(console.log("Color.js not found!"),e)},s.addResizeListener=function(t,e){var i=document.createElement("iframe"),a="chartjs-hidden-iframe";i.classlist?i.classlist.add(a):i.setAttribute("class",a),i.style.width="100%",i.style.display="block",i.style.border=0,i.style.height=0,i.style.margin=0,i.style.position="absolute",i.style.left=0,i.style.right=0,i.style.top=0,i.style.bottom=0,t.insertBefore(i,t.firstChild),(i.contentWindow||i).onresize=function(){e&&e()}},s.removeResizeListener=function(t){var e=t.querySelector(".chartjs-hidden-iframe");e&&e.parentNode.removeChild(e)},s.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===Object.prototype.toString.call(t)},s.pushAllIfDefined=function(t,e){"undefined"!=typeof t&&(s.isArray(t)?e.push.apply(e,t):e.push(t))},s.isDatasetVisible=function(t){return!t.hidden},s.callCallback=function(t,e,i){t&&"function"==typeof t.call&&t.apply(i,e)}}},{"chartjs-color":5}],26:[function(t,e,i){"use strict";e.exports=function(){var t=function(e,i){this.config=i,e.length&&e[0].getContext&&(e=e[0]),e.getContext&&(e=e.getContext("2d")),this.ctx=e,this.canvas=e.canvas,this.width=e.canvas.width||parseInt(t.helpers.getStyle(e.canvas,"width"))||t.helpers.getMaximumWidth(e.canvas),this.height=e.canvas.height||parseInt(t.helpers.getStyle(e.canvas,"height"))||t.helpers.getMaximumHeight(e.canvas),this.aspectRatio=this.width/this.height,(isNaN(this.aspectRatio)||isFinite(this.aspectRatio)===!1)&&(this.aspectRatio=void 0!==i.aspectRatio?i.aspectRatio:2),this.originalCanvasStyleWidth=e.canvas.style.width,this.originalCanvasStyleHeight=e.canvas.style.height,t.helpers.retinaScale(this),i&&(this.controller=new t.Controller(this));var a=this;return t.helpers.addResizeListener(e.canvas.parentNode,function(){a.controller&&a.controller.config.options.responsive&&a.controller.resize()}),this.controller?this.controller:this};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('
    ');for(var i=0;i'),t.data.datasets[i].label&&e.push(t.data.datasets[i].label),e.push("");return e.push("
"),e.join("")}}},t}},{}],27:[function(t,e,i){"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,a){function s(t){var e,i=t.isHorizontal();i?(e=t.update(t.options.fullWidth?m:k,y),_-=e.height):(e=t.update(x,v),k-=e.width),D.push({horizontal:i,minSize:e,box:t})}function o(t){var i=e.findNextWhere(D,function(e){return e.box===t});if(i)if(t.isHorizontal()){var a={left:S,right:w,top:0,bottom:0};t.update(t.options.fullWidth?m:k,p/2,a)}else t.update(i.minSize.width,_)}function n(t){var i=e.findNextWhere(D,function(e){return e.box===t}),a={left:0,right:0,top:C,bottom:M};i&&t.update(i.minSize.width,_,a)}function r(t){t.isHorizontal()?(t.left=t.options.fullWidth?l:S,t.right=t.options.fullWidth?i-l:S+k,t.top=F,t.bottom=F+t.height,F=t.bottom):(t.left=T,t.right=T+t.width,t.top=C,t.bottom=C+_,T=t.right)}if(t){var l=0,h=0,c=e.where(t.boxes,function(t){return"left"===t.options.position}),u=e.where(t.boxes,function(t){return"right"===t.options.position}),d=e.where(t.boxes,function(t){return"top"===t.options.position}),f=e.where(t.boxes,function(t){return"bottom"===t.options.position}),g=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)}),f.sort(function(t,e){return(t.options.fullWidth?1:0)-(e.options.fullWidth?1:0)});var m=i-2*l,p=a-2*h,b=m/2,v=p/2,x=(i-b)/(c.length+u.length),y=(a-v)/(d.length+f.length),k=m,_=p,D=[];e.each(c.concat(u,d,f),s);var S=l,w=l,C=h,M=h;e.each(c.concat(u),o),e.each(c,function(t){S+=t.width}),e.each(u,function(t){w+=t.width}),e.each(d.concat(f),o),e.each(d,function(t){C+=t.height}),e.each(f,function(t){M+=t.height}),e.each(c.concat(u),n),S=l,w=l,C=h,M=h,e.each(c,function(t){S+=t.width}),e.each(u,function(t){w+=t.width}),e.each(d,function(t){C+=t.height}),e.each(f,function(t){M+=t.height});var A=a-C-M,I=i-S-w;(I!==k||A!==_)&&(e.each(c,function(t){t.height=A}),e.each(u,function(t){t.height=A}),e.each(d,function(t){t.width=I}),e.each(f,function(t){t.width=I}),_=A,k=I);var T=l,F=h;e.each(c.concat(d),r),T+=k,F+=_,e.each(u,r),e.each(f,r),t.chartArea={left:S,top:C,right:S+k,bottom:C+_},e.each(g,function(e){e.left=t.chartArea.left,e.top=t.chartArea.top,e.right=t.chartArea.right,e.bottom=t.chartArea.bottom,e.update(k,_)})}}}}},{}],28:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.global.legend={display:!0,position:"top",fullWidth:!0,reverse:!1,onClick:function(t,e){var i=this.chart.data.datasets[e.datasetIndex];i.hidden=!i.hidden,this.chart.update()},labels:{boxWidth:40,padding:10,generateLabels:function(t){return e.isArray(t.datasets)?t.datasets.map(function(t,e){return{text:t.label,fillStyle:t.backgroundColor,hidden:t.hidden,lineCap:t.borderCapStyle,lineDash:t.borderDash,lineDashOffset:t.borderDashOffset,lineJoin:t.borderJoinStyle,lineWidth:t.borderWidth,strokeStyle:t.borderColor,datasetIndex:e}},this):[]}}},t.Legend=t.Element.extend({initialize:function(t){e.extend(this,t),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:e.noop,update:function(t,e,i){return this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this.margins=i,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this.beforeBuildLabels(),this.buildLabels(),this.afterBuildLabels(),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate(),this.minSize},afterUpdate:e.noop,beforeSetDimensions:e.noop,setDimensions:function(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0,this.minSize={width:0,height:0}},afterSetDimensions:e.noop,beforeBuildLabels:e.noop,buildLabels:function(){this.legendItems=this.options.labels.generateLabels.call(this,this.chart.data),this.options.reverse&&this.legendItems.reverse()},afterBuildLabels:e.noop,beforeFit:e.noop,fit:function(){var i=this.ctx,a=e.getValueOrDefault(this.options.labels.fontSize,t.defaults.global.defaultFontSize),s=e.getValueOrDefault(this.options.labels.fontStyle,t.defaults.global.defaultFontStyle),o=e.getValueOrDefault(this.options.labels.fontFamily,t.defaults.global.defaultFontFamily),n=e.fontString(a,s,o);if(this.legendHitBoxes=[],this.isHorizontal()?this.minSize.width=this.maxWidth:this.minSize.width=this.options.display?10:0,this.isHorizontal()?this.minSize.height=this.options.display?10:0:this.minSize.height=this.maxHeight,this.options.display&&this.isHorizontal()){this.lineWidths=[0];var r=this.legendItems.length?a+this.options.labels.padding:0;i.textAlign="left",i.textBaseline="top",i.font=n,e.each(this.legendItems,function(t,e){var s=this.options.labels.boxWidth+a/2+i.measureText(t.text).width;this.lineWidths[this.lineWidths.length-1]+s+this.options.labels.padding>=this.width&&(r+=a+this.options.labels.padding,this.lineWidths[this.lineWidths.length]=this.left),this.legendHitBoxes[e]={left:0,top:0,width:s,height:a},this.lineWidths[this.lineWidths.length-1]+=s+this.options.labels.padding},this),this.minSize.height+=r}this.width=this.minSize.width,this.height=this.minSize.height},afterFit:e.noop,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){if(this.options.display){var i=this.ctx,a={x:this.left+(this.width-this.lineWidths[0])/2,y:this.top+this.options.labels.padding,line:0},s=e.getValueOrDefault(this.options.labels.fontColor,t.defaults.global.defaultFontColor),o=e.getValueOrDefault(this.options.labels.fontSize,t.defaults.global.defaultFontSize),n=e.getValueOrDefault(this.options.labels.fontStyle,t.defaults.global.defaultFontStyle),r=e.getValueOrDefault(this.options.labels.fontFamily,t.defaults.global.defaultFontFamily),l=e.fontString(o,n,r);this.isHorizontal()&&(i.textAlign="left",i.textBaseline="top",i.lineWidth=.5,i.strokeStyle=s,i.fillStyle=s,i.font=l,e.each(this.legendItems,function(e,s){var n=i.measureText(e.text).width,r=this.options.labels.boxWidth+o/2+n;a.x+r>=this.width&&(a.y+=o+this.options.labels.padding,a.line++,a.x=this.left+(this.width-this.lineWidths[a.line])/2),i.save();var l=function(t,e){return void 0!==t?t:e};i.fillStyle=l(e.fillStyle,t.defaults.global.defaultColor),i.lineCap=l(e.lineCap,t.defaults.global.elements.line.borderCapStyle),i.lineDashOffset=l(e.lineDashOffset,t.defaults.global.elements.line.borderDashOffset),i.lineJoin=l(e.lineJoin,t.defaults.global.elements.line.borderJoinStyle),i.lineWidth=l(e.lineWidth,t.defaults.global.elements.line.borderWidth),i.strokeStyle=l(e.strokeStyle,t.defaults.global.defaultColor),i.setLineDash&&i.setLineDash(l(e.lineDash,t.defaults.global.elements.line.borderDash)),i.strokeRect(a.x,a.y,this.options.labels.boxWidth,o),i.fillRect(a.x,a.y,this.options.labels.boxWidth,o),i.restore(),this.legendHitBoxes[s].left=a.x,this.legendHitBoxes[s].top=a.y,i.fillText(e.text,this.options.labels.boxWidth+o/2+a.x,a.y),e.hidden&&(i.beginPath(),i.lineWidth=2,i.moveTo(this.options.labels.boxWidth+o/2+a.x,a.y+o/2),i.lineTo(this.options.labels.boxWidth+o/2+a.x+n,a.y+o/2),i.stroke()),a.x+=r+this.options.labels.padding},this))}},handleEvent:function(t){var i=e.getRelativePosition(t,this.chart.chart);if(i.x>=this.left&&i.x<=this.right&&i.y>=this.top&&i.y<=this.bottom)for(var a=0;a=s.left&&i.x<=s.left+s.width&&i.y>=s.top&&i.y<=s.top+s.height){this.options.onClick&&this.options.onClick.call(this,t,this.legendItems[a]);break}}}})}},{}],29:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.scale={display:!0,gridLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1,drawOnChartArea:!0,drawTicks:!0,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",offsetGridLines:!1},scaleLabel:{labelString:"",display:!1},ticks:{beginAtZero:!1,maxRotation:50,mirror:!1,padding:10,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,callback:function(t){return""+t}}},t.Scale=t.Element.extend({beforeUpdate:function(){e.callCallback(this.options.beforeUpdate,[this])},update:function(t,i,a){return this.beforeUpdate(),this.maxWidth=t,this.maxHeight=i,this.margins=e.extend({left:0,right:0,top:0,bottom:0},a),this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this.beforeBuildTicks(),this.buildTicks(),this.afterBuildTicks(),this.beforeTickToLabelConversion(),this.convertTicksToLabels(),this.afterTickToLabelConversion(),this.beforeCalculateTickRotation(),this.calculateTickRotation(),this.afterCalculateTickRotation(),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate(),this.minSize},afterUpdate:function(){e.callCallback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){e.callCallback(this.options.beforeSetDimensions,[this])},setDimensions:function(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.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(){this.ticks=this.ticks.map(function(t,e,i){return this.options.ticks.userCallback?this.options.ticks.userCallback(t,e,i):this.options.ticks.callback(t,e,i)},this)},afterTickToLabelConversion:function(){e.callCallback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){e.callCallback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var i=e.getValueOrDefault(this.options.ticks.fontSize,t.defaults.global.defaultFontSize),a=e.getValueOrDefault(this.options.ticks.fontStyle,t.defaults.global.defaultFontStyle),s=e.getValueOrDefault(this.options.ticks.fontFamily,t.defaults.global.defaultFontFamily),o=e.fontString(i,a,s);this.ctx.font=o;var n,r=this.ctx.measureText(this.ticks[0]).width,l=this.ctx.measureText(this.ticks[this.ticks.length-1]).width;if(this.labelRotation=0,this.paddingRight=0,this.paddingLeft=0,this.options.display&&this.isHorizontal()){this.paddingRight=l/2+3,this.paddingLeft=r/2+3,this.longestTextCache||(this.longestTextCache={});for(var h,c,u=e.longestText(this.ctx,o,this.ticks,this.longestTextCache),d=u,f=this.getPixelForTick(1)-this.getPixelForTick(0)-6;d>f&&this.labelRotationthis.yLabelWidth&&(this.paddingLeft=n+i/2),this.paddingRight=i/2,c*u>this.maxHeight){this.labelRotation--;break}this.labelRotation++,d=h*u}}this.margins&&(this.paddingLeft=Math.max(this.paddingLeft-this.margins.left,0),this.paddingRight=Math.max(this.paddingRight-this.margins.right,0))},afterCalculateTickRotation:function(){e.callCallback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){e.callCallback(this.options.beforeFit,[this])},fit:function(){this.minSize={width:0,height:0};var i=e.getValueOrDefault(this.options.ticks.fontSize,t.defaults.global.defaultFontSize),a=e.getValueOrDefault(this.options.ticks.fontStyle,t.defaults.global.defaultFontStyle),s=e.getValueOrDefault(this.options.ticks.fontFamily,t.defaults.global.defaultFontFamily),o=e.fontString(i,a,s),n=e.getValueOrDefault(this.options.scaleLabel.fontSize,t.defaults.global.defaultFontSize),r=e.getValueOrDefault(this.options.scaleLabel.fontStyle,t.defaults.global.defaultFontStyle),l=e.getValueOrDefault(this.options.scaleLabel.fontFamily,t.defaults.global.defaultFontFamily);e.fontString(n,r,l);if(this.isHorizontal()?this.minSize.width=this.isFullWidth()?this.maxWidth-this.margins.left-this.margins.right:this.maxWidth:this.minSize.width=this.options.gridLines.display&&this.options.display?10:0,this.isHorizontal()?this.minSize.height=this.options.gridLines.display&&this.options.display?10:0:this.minSize.height=this.maxHeight,this.options.scaleLabel.display&&(this.isHorizontal()?this.minSize.height+=1.5*n:this.minSize.width+=1.5*n),this.options.ticks.display&&this.options.display){this.longestTextCache||(this.longestTextCache={});var h=e.longestText(this.ctx,o,this.ticks,this.longestTextCache);if(this.isHorizontal()){this.longestLabelWidth=h;var c=Math.sin(e.toRadians(this.labelRotation))*this.longestLabelWidth+1.5*i;this.minSize.height=Math.min(this.maxHeight,this.minSize.height+c),this.ctx.font=o;var u=this.ctx.measureText(this.ticks[0]).width,d=this.ctx.measureText(this.ticks[this.ticks.length-1]).width,f=Math.cos(e.toRadians(this.labelRotation)),g=Math.sin(e.toRadians(this.labelRotation));this.paddingLeft=0!==this.labelRotation?f*u+3:u/2+3,this.paddingRight=0!==this.labelRotation?g*(i/2)+3:d/2+3}else{var m=this.maxWidth-this.minSize.width;this.options.ticks.mirror||(h+=this.options.ticks.padding),m>h?this.minSize.width+=h:this.minSize.width=this.maxWidth,this.paddingTop=i/2,this.paddingBottom=i/2}}this.margins&&(this.paddingLeft=Math.max(this.paddingLeft-this.margins.left,0),this.paddingTop=Math.max(this.paddingTop-this.margins.top,0),this.paddingRight=Math.max(this.paddingRight-this.margins.right,0),this.paddingBottom=Math.max(this.paddingBottom-this.margins.bottom,0)),this.width=this.minSize.width,this.height=this.minSize.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 i(t){return null===t||"undefined"==typeof t?NaN:"number"==typeof t&&isNaN(t)?NaN:"object"==typeof t?t instanceof Date?t:i(this.isHorizontal()?t.x:t.y):t},getLabelForIndex:e.noop,getPixelForValue:e.noop,getPixelForTick:function(t,e){if(this.isHorizontal()){var i=this.width-(this.paddingLeft+this.paddingRight),a=i/Math.max(this.ticks.length-(this.options.gridLines.offsetGridLines?0:1),1),s=a*t+this.paddingLeft;e&&(s+=a/2);var o=this.left+Math.round(s);return o+=this.isFullWidth()?this.margins.left:0}var n=this.height-(this.paddingTop+this.paddingBottom);return this.top+t*(n/(this.ticks.length-1))},getPixelForDecimal:function(t){if(this.isHorizontal()){var e=this.width-(this.paddingLeft+this.paddingRight),i=e*t+this.paddingLeft,a=this.left+Math.round(i);return a+=this.isFullWidth()?this.margins.left:0}return this.top+t*this.height},draw:function(i){if(this.options.display){var a,s,o,n,r,l=0!==this.labelRotation,h=this.options.ticks.autoSkip;this.options.ticks.maxTicksLimit&&(r=this.options.ticks.maxTicksLimit);var c=e.getValueOrDefault(this.options.ticks.fontColor,t.defaults.global.defaultFontColor),u=e.getValueOrDefault(this.options.ticks.fontSize,t.defaults.global.defaultFontSize),d=e.getValueOrDefault(this.options.ticks.fontStyle,t.defaults.global.defaultFontStyle),f=e.getValueOrDefault(this.options.ticks.fontFamily,t.defaults.global.defaultFontFamily),g=e.fontString(u,d,f),m=e.getValueOrDefault(this.options.scaleLabel.fontColor,t.defaults.global.defaultFontColor),p=e.getValueOrDefault(this.options.scaleLabel.fontSize,t.defaults.global.defaultFontSize),b=e.getValueOrDefault(this.options.scaleLabel.fontStyle,t.defaults.global.defaultFontStyle),v=e.getValueOrDefault(this.options.scaleLabel.fontFamily,t.defaults.global.defaultFontFamily),x=e.fontString(p,b,v),y=Math.cos(e.toRadians(this.labelRotation)),k=(Math.sin(e.toRadians(this.labelRotation)),this.longestLabelWidth*y);if(this.ctx.fillStyle=c,this.isHorizontal()){a=!0;var _="bottom"===this.options.position?this.top:this.bottom-10,D="bottom"===this.options.position?this.top+10:this.bottom;if(s=!1,(k/2+this.options.ticks.autoSkipPadding)*this.ticks.length>this.width-(this.paddingLeft+this.paddingRight)&&(s=1+Math.floor((k/2+this.options.ticks.autoSkipPadding)*this.ticks.length/(this.width-(this.paddingLeft+this.paddingRight)))),r&&this.ticks.length>r)for(;!s||this.ticks.length/(s||1)>r;)s||(s=1),s+=1;h||(s=!1),e.each(this.ticks,function(t,o){var n=this.ticks.length===o+1,r=s>1&&o%s>0||o%s===0&&o+s>this.ticks.length;if((!r||n)&&void 0!==t&&null!==t){var h=this.getPixelForTick(o),c=this.getPixelForTick(o,this.options.gridLines.offsetGridLines);this.options.gridLines.display&&(o===("undefined"!=typeof this.zeroLineIndex?this.zeroLineIndex:0)?(this.ctx.lineWidth=this.options.gridLines.zeroLineWidth,this.ctx.strokeStyle=this.options.gridLines.zeroLineColor,a=!0):a&&(this.ctx.lineWidth=this.options.gridLines.lineWidth,this.ctx.strokeStyle=this.options.gridLines.color,a=!1),h+=e.aliasPixel(this.ctx.lineWidth),this.ctx.beginPath(),this.options.gridLines.drawTicks&&(this.ctx.moveTo(h,_),this.ctx.lineTo(h,D)),this.options.gridLines.drawOnChartArea&&(this.ctx.moveTo(h,i.top),this.ctx.lineTo(h,i.bottom)),this.ctx.stroke()),this.options.ticks.display&&(this.ctx.save(),this.ctx.translate(c,l?this.top+12:"top"===this.options.position?this.bottom-10:this.top+10),this.ctx.rotate(-1*e.toRadians(this.labelRotation)),this.ctx.font=g,this.ctx.textAlign=l?"right":"center",this.ctx.textBaseline=l?"middle":"top"===this.options.position?"bottom":"top",this.ctx.fillText(t,0,0),this.ctx.restore())}},this),this.options.scaleLabel.display&&(this.ctx.textAlign="center",this.ctx.textBaseline="middle",this.ctx.fillStyle=m,this.ctx.font=x,o=this.left+(this.right-this.left)/2,n="bottom"===this.options.position?this.bottom-p/2:this.top+p/2,this.ctx.fillText(this.options.scaleLabel.labelString,o,n))}else{a=!0;var S="right"===this.options.position?this.left:this.right-5,w="right"===this.options.position?this.left+5:this.right;if(e.each(this.ticks,function(t,s){if(void 0!==t&&null!==t){var o=this.getPixelForTick(s);if(this.options.gridLines.display&&(s===("undefined"!=typeof this.zeroLineIndex?this.zeroLineIndex:0)?(this.ctx.lineWidth=this.options.gridLines.zeroLineWidth,this.ctx.strokeStyle=this.options.gridLines.zeroLineColor,a=!0):a&&(this.ctx.lineWidth=this.options.gridLines.lineWidth,this.ctx.strokeStyle=this.options.gridLines.color,a=!1),o+=e.aliasPixel(this.ctx.lineWidth),this.ctx.beginPath(),this.options.gridLines.drawTicks&&(this.ctx.moveTo(S,o),this.ctx.lineTo(w,o)),this.options.gridLines.drawOnChartArea&&(this.ctx.moveTo(i.left,o),this.ctx.lineTo(i.right,o)),this.ctx.stroke()),this.options.ticks.display){var n,r=this.getPixelForTick(s,this.options.gridLines.offsetGridLines);this.ctx.save(),"left"===this.options.position?this.options.ticks.mirror?(n=this.right+this.options.ticks.padding,this.ctx.textAlign="left"):(n=this.right-this.options.ticks.padding,this.ctx.textAlign="right"):this.options.ticks.mirror?(n=this.left-this.options.ticks.padding,this.ctx.textAlign="right"):(n=this.left+this.options.ticks.padding,this.ctx.textAlign="left"),this.ctx.translate(n,r),this.ctx.rotate(-1*e.toRadians(this.labelRotation)),this.ctx.font=g,this.ctx.textBaseline="middle",this.ctx.fillText(t,0,0),this.ctx.restore()}}},this),this.options.scaleLabel.display){o="left"===this.options.position?this.left+p/2:this.right-p/2,n=this.top+(this.bottom-this.top)/2;var C="left"===this.options.position?-.5*Math.PI:.5*Math.PI;this.ctx.save(),this.ctx.translate(o,n),this.ctx.rotate(C),this.ctx.textAlign="center",this.ctx.fillStyle=m,this.ctx.font=x,this.ctx.textBaseline="middle",this.ctx.fillText(this.options.scaleLabel.labelString,0,0),this.ctx.restore()}}this.ctx.lineWidth=this.options.gridLines.lineWidth,this.ctx.strokeStyle=this.options.gridLines.color;var M=this.left,A=this.right,I=this.top,T=this.bottom;this.isHorizontal()?(I=T="top"===this.options.position?this.bottom:this.top,I+=e.aliasPixel(this.ctx.lineWidth),T+=e.aliasPixel(this.ctx.lineWidth)):(M=A="left"===this.options.position?this.right:this.left,M+=e.aliasPixel(this.ctx.lineWidth),A+=e.aliasPixel(this.ctx.lineWidth)),this.ctx.beginPath(),this.ctx.moveTo(M,I),this.ctx.lineTo(A,T),this.ctx.stroke()}}})}},{}],30:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.scaleService={constructors:{},defaults:{},registerScaleType:function(t,i,a){this.constructors[t]=i,this.defaults[t]=e.clone(a)},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]):{}},addScalesToLayout:function(i){e.each(i.scales,function(e){t.layoutService.addBox(i,e)})}}}},{}],31:[function(t,e,i){"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:""},t.Title=t.Element.extend({initialize:function(i){e.extend(this,i),this.options=e.configMerge(t.defaults.global.title,i.options),this.legendHitBoxes=[]},beforeUpdate:e.noop,update:function(t,e,i){return this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this.margins=i,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this.beforeBuildLabels(),this.buildLabels(),this.afterBuildLabels(),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate(),this.minSize},afterUpdate:e.noop,beforeSetDimensions:e.noop,setDimensions:function(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0,this.minSize={width:0,height:0}},afterSetDimensions:e.noop,beforeBuildLabels:e.noop,buildLabels:e.noop,afterBuildLabels:e.noop,beforeFit:e.noop,fit:function(){var i=(this.ctx,e.getValueOrDefault(this.options.fontSize,t.defaults.global.defaultFontSize)),a=e.getValueOrDefault(this.options.fontStyle,t.defaults.global.defaultFontStyle),s=e.getValueOrDefault(this.options.fontFamily,t.defaults.global.defaultFontFamily);e.fontString(i,a,s);this.isHorizontal()?this.minSize.width=this.maxWidth:this.minSize.width=0,this.isHorizontal()?this.minSize.height=0:this.minSize.height=this.maxHeight,this.isHorizontal()?this.options.display&&(this.minSize.height+=i+2*this.options.padding):this.options.display&&(this.minSize.width+=i+2*this.options.padding),this.width=this.minSize.width,this.height=this.minSize.height},afterFit:e.noop,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){if(this.options.display){var i,a,s=this.ctx,o=e.getValueOrDefault(this.options.fontColor,t.defaults.global.defaultFontColor),n=e.getValueOrDefault(this.options.fontSize,t.defaults.global.defaultFontSize),r=e.getValueOrDefault(this.options.fontStyle,t.defaults.global.defaultFontStyle),l=e.getValueOrDefault(this.options.fontFamily,t.defaults.global.defaultFontFamily),h=e.fontString(n,r,l);if(s.fillStyle=o,s.font=h,this.isHorizontal())s.textAlign="center",s.textBaseline="middle",i=this.left+(this.right-this.left)/2,a=this.top+(this.bottom-this.top)/2,s.fillText(this.options.text,i,a);else{i="left"===this.options.position?this.left+n/2:this.right-n/2,a=this.top+(this.bottom-this.top)/2;var c="left"===this.options.position?-.5*Math.PI:.5*Math.PI;s.save(),s.translate(i,a),s.rotate(c),s.textAlign="center",s.textBaseline="middle",s.fillText(this.options.text,0,0),s.restore()}}}})}},{}],32:[function(t,e,i){"use strict";e.exports=function(t){function e(t,e){return e&&(i.isArray(e)?t=t.concat(e):t.push(e)),t}var i=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,titleColor:"#fff",titleAlign:"left",bodySpacing:2,bodyColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,yAlign:"center",xAlign:"center",caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",callbacks:{beforeTitle:i.noop,title:function(t,e){var i="";return t.length>0&&(t[0].xLabel?i=t[0].xLabel:e.labels.length>0&&t[0].indexthis._chart.height-t.height&&(this._model.yAlign="bottom");var e,i,a,s,o,n=this,r=(this._chartInstance.chartArea.left+this._chartInstance.chartArea.right)/2,l=(this._chartInstance.chartArea.top+this._chartInstance.chartArea.bottom)/2;"center"===this._model.yAlign?(e=function(t){return r>=t},i=function(t){return t>r}):(e=function(e){return e<=t.width/2},i=function(e){return e>=n._chart.width-t.width/2}),a=function(e){return e+t.width>n._chart.width},s=function(e){return e-t.width<0},o=function(t){return l>=t?"top":"bottom"},e(this._model.x)?(this._model.xAlign="left",a(this._model.x)&&(this._model.xAlign="center",this._model.yAlign=o(this._model.y))):i(this._model.x)&&(this._model.xAlign="right",s(this._model.x)&&(this._model.xAlign="center",this._model.yAlign=o(this._model.y)))},getBackgroundPoint:function(t,e){var i={x:t.x,y:t.y};return"right"===t.xAlign?i.x-=e.width:"center"===t.xAlign&&(i.x-=e.width/2),"top"===t.yAlign?i.y+=t.caretPadding+t.caretSize:"bottom"===t.yAlign?i.y-=e.height+t.caretPadding+t.caretSize:i.y-=e.height/2,"center"===t.yAlign?"left"===t.xAlign?i.x+=t.caretPadding+t.caretSize:"right"===t.xAlign&&(i.x-=t.caretPadding+t.caretSize):"left"===t.xAlign?i.x-=t.cornerRadius+t.caretPadding:"right"===t.xAlign&&(i.x+=t.cornerRadius+t.caretPadding),i},drawCaret:function(t,e,a,s){var o,n,r,l,h,c,u=this._view,d=this._chart.ctx;"center"===u.yAlign?("left"===u.xAlign?(o=t.x,n=o-u.caretSize,r=o):(o=t.x+e.width,n=o+u.caretSize,r=o),h=t.y+e.height/2,l=h-u.caretSize,c=h+u.caretSize):("left"===u.xAlign?(o=t.x+u.cornerRadius,n=o+u.caretSize,r=n+u.caretSize):"right"===u.xAlign?(o=t.x+e.width-u.cornerRadius,n=o-u.caretSize,r=n-u.caretSize):(n=t.x+e.width/2,o=n-u.caretSize,r=n+u.caretSize),"top"===u.yAlign?(l=t.y,h=l-u.caretSize,c=l):(l=t.y+e.height,h=l+u.caretSize,c=l));var f=i.color(u.backgroundColor);d.fillStyle=f.alpha(a*f.alpha()).rgbString(),d.beginPath(),d.moveTo(o,l),d.lineTo(n,h),d.lineTo(r,c),d.closePath(),d.fill()},drawTitle:function(t,e,a,s){if(e.title.length){a.textAlign=e._titleAlign,a.textBaseline="top";var o=i.color(e.titleColor);a.fillStyle=o.alpha(s*o.alpha()).rgbString(),a.font=i.fontString(e.titleFontSize,e._titleFontStyle,e._titleFontFamily),i.each(e.title,function(i,s){a.fillText(i,t.x,t.y),t.y+=e.titleFontSize+e.titleSpacing,s+1===e.title.length&&(t.y+=e.titleMarginBottom-e.titleSpacing)})}},drawBody:function(t,e,a,s){a.textAlign=e._bodyAlign,a.textBaseline="top";var o=i.color(e.bodyColor);a.fillStyle=o.alpha(s*o.alpha()).rgbString(),a.font=i.fontString(e.bodyFontSize,e._bodyFontStyle,e._bodyFontFamily),i.each(e.beforeBody,function(i){a.fillText(i,t.x,t.y),t.y+=e.bodyFontSize+e.bodySpacing}),i.each(e.body,function(o,n){"single"!==this._options.tooltips.mode&&(a.fillStyle=i.color(e.legendColorBackground).alpha(s).rgbaString(),a.fillRect(t.x,t.y,e.bodyFontSize,e.bodyFontSize),a.strokeStyle=i.color(e.labelColors[n].borderColor).alpha(s).rgbaString(),a.strokeRect(t.x,t.y,e.bodyFontSize,e.bodyFontSize),a.fillStyle=i.color(e.labelColors[n].backgroundColor).alpha(s).rgbaString(),a.fillRect(t.x+1,t.y+1,e.bodyFontSize-2,e.bodyFontSize-2),a.fillStyle=i.color(e.bodyColor).alpha(s).rgbaString()),a.fillText(o,t.x+("single"!==this._options.tooltips.mode?e.bodyFontSize+2:0),t.y),t.y+=e.bodyFontSize+e.bodySpacing},this),i.each(e.afterBody,function(i){a.fillText(i,t.x,t.y),t.y+=e.bodyFontSize}),t.y-=e.bodySpacing},drawFooter:function(t,e,a,s){if(e.footer.length){t.y+=e.footerMarginTop,a.textAlign=e._footerAlign,a.textBaseline="top";var o=i.color(e.footerColor);a.fillStyle=o.alpha(s*o.alpha()).rgbString(),a.font=i.fontString(e.footerFontSize,e._footerFontStyle,e._footerFontFamily),i.each(e.footer,function(i){a.fillText(i,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 a=e.caretPadding,s=this.getTooltipSize(e),o={x:e.x,y:e.y},n=Math.abs(e.opacity<.001)?0:e.opacity;if(this._options.tooltips.enabled){var r=i.color(e.backgroundColor);t.fillStyle=r.alpha(n*r.alpha()).rgbString(),i.drawRoundedRectangle(t,o.x,o.y,s.width,s.height,e.cornerRadius),t.fill(),this.drawCaret(o,s,n,a),o.x+=e.xPadding,o.y+=e.yPadding,this.drawTitle(o,e,t,n),this.drawBody(o,e,t,n),this.drawFooter(o,e,t,n)}}}})}},{}],33:[function(t,e,i){"use strict";e.exports=function(t,e){var i=t.helpers;t.defaults.global.elements.arc={backgroundColor:t.defaults.global.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)n;)n+=2*Math.PI;for(;s.angle>n;)s.angle-=2*Math.PI;for(;s.angle=o&&s.angle<=n,l=s.distance>=a.innerRadius&&s.distance<=a.outerRadius;return r&&l}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;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,e.startAngle,e.endAngle),t.arc(e.x,e.y,e.innerRadius,e.endAngle,e.startAngle,!0),t.closePath(),t.strokeStyle=e.borderColor,t.lineWidth=e.borderWidth,t.fillStyle=e.backgroundColor,t.fill(),t.lineJoin="bevel",e.borderWidth&&t.stroke()}})}},{}],34:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.global.elements.line={tension:.4,backgroundColor:t.defaults.global.defaultColor,borderWidth:3,borderColor:t.defaults.global.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",fill:!0},t.elements.Line=t.Element.extend({lineToNextPoint:function(t,e,i,a,s){var o=this._chart.ctx;e._view.skip?a.call(this,t,e,i):t._view.skip?s.call(this,t,e,i):0===e._view.tension?o.lineTo(e._view.x,e._view.y):o.bezierCurveTo(t._view.controlPointNextX,t._view.controlPointNextY,e._view.controlPointPreviousX,e._view.controlPointPreviousY,e._view.x,e._view.y)},draw:function(){function i(t){n._view.skip||r._view.skip?t&&o.lineTo(a._view.scaleZero.x,a._view.scaleZero.y):o.bezierCurveTo(r._view.controlPointNextX,r._view.controlPointNextY,n._view.controlPointPreviousX,n._view.controlPointPreviousY,n._view.x,n._view.y)}var a=this,s=this._view,o=this._chart.ctx,n=this._children[0],r=this._children[this._children.length-1];o.save(),this._children.length>0&&s.fill&&(o.beginPath(),e.each(this._children,function(t,i){var a=e.previousItem(this._children,i),n=e.nextItem(this._children,i);0===i?(this._loop?o.moveTo(s.scaleZero.x,s.scaleZero.y):o.moveTo(t._view.x,s.scaleZero),t._view.skip?this._loop||o.moveTo(n._view.x,this._view.scaleZero):o.lineTo(t._view.x,t._view.y)):this.lineToNextPoint(a,t,n,function(t,e,i){this._loop?o.lineTo(this._view.scaleZero.x,this._view.scaleZero.y):(o.lineTo(t._view.x,this._view.scaleZero),o.moveTo(i._view.x,this._view.scaleZero))},function(t,e){o.lineTo(e._view.x,e._view.y)})},this),this._loop?i(!0):(o.lineTo(this._children[this._children.length-1]._view.x,s.scaleZero),o.lineTo(this._children[0]._view.x,s.scaleZero)),o.fillStyle=s.backgroundColor||t.defaults.global.defaultColor,o.closePath(),o.fill()),o.lineCap=s.borderCapStyle||t.defaults.global.elements.line.borderCapStyle,o.setLineDash&&o.setLineDash(s.borderDash||t.defaults.global.elements.line.borderDash),o.lineDashOffset=s.borderDashOffset||t.defaults.global.elements.line.borderDashOffset,o.lineJoin=s.borderJoinStyle||t.defaults.global.elements.line.borderJoinStyle,o.lineWidth=s.borderWidth||t.defaults.global.elements.line.borderWidth,o.strokeStyle=s.borderColor||t.defaults.global.defaultColor,o.beginPath(),e.each(this._children,function(t,i){var a=e.previousItem(this._children,i),s=e.nextItem(this._children,i);0===i?o.moveTo(t._view.x,t._view.y):this.lineToNextPoint(a,t,s,function(t,e,i){o.moveTo(i._view.x,i._view.y)},function(t,e){o.moveTo(e._view.x,e._view.y)})},this),this._loop&&this._children.length>0&&i(),o.stroke(),o.restore()}})}},{}],35:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.global.elements.point={radius:3,pointStyle:"circle",backgroundColor:t.defaults.global.defaultColor,borderWidth:1,borderColor:t.defaults.global.defaultColor,hitRadius:1,hoverRadius:4,hoverBorderWidth:1},t.elements.Point=t.Element.extend({inRange:function(t,e){var i=this._view;if(i){var a=i.hitRadius+i.radius;return Math.pow(t-i.x,2)+Math.pow(e-i.y,2)0){a.strokeStyle=i.borderColor||t.defaults.global.defaultColor,a.lineWidth=e.getValueOrDefault(i.borderWidth,t.defaults.global.elements.point.borderWidth),a.fillStyle=i.backgroundColor||t.defaults.global.defaultColor;var s,o,n=i.radius;switch(i.pointStyle){default:a.beginPath(),a.arc(i.x,i.y,n,0,2*Math.PI),a.closePath(),a.fill();break;case"triangle":a.beginPath();var r=3*n/Math.sqrt(3),l=r*Math.sqrt(3)/2;a.moveTo(i.x-r/2,i.y+l/3),a.lineTo(i.x+r/2,i.y+l/3),a.lineTo(i.x,i.y-2*l/3),a.closePath(),a.fill();break;case"rect":a.fillRect(i.x-1/Math.SQRT2*n,i.y-1/Math.SQRT2*n,2/Math.SQRT2*n,2/Math.SQRT2*n),a.strokeRect(i.x-1/Math.SQRT2*n,i.y-1/Math.SQRT2*n,2/Math.SQRT2*n,2/Math.SQRT2*n);break;case"rectRot":a.translate(i.x,i.y),a.rotate(Math.PI/4),a.fillRect(-1/Math.SQRT2*n,-1/Math.SQRT2*n,2/Math.SQRT2*n,2/Math.SQRT2*n),a.strokeRect(-1/Math.SQRT2*n,-1/Math.SQRT2*n,2/Math.SQRT2*n,2/Math.SQRT2*n),a.setTransform(1,0,0,1,0,0);break;case"cross":a.beginPath(),a.moveTo(i.x,i.y+n),a.lineTo(i.x,i.y-n),a.moveTo(i.x-n,i.y),a.lineTo(i.x+n,i.y),a.closePath();break;case"crossRot":a.beginPath(),s=Math.cos(Math.PI/4)*n,o=Math.sin(Math.PI/4)*n,a.moveTo(i.x-s,i.y-o),a.lineTo(i.x+s,i.y+o),a.moveTo(i.x-s,i.y+o),a.lineTo(i.x+s,i.y-o),a.closePath();break;case"star":a.beginPath(),a.moveTo(i.x,i.y+n),a.lineTo(i.x,i.y-n),a.moveTo(i.x-n,i.y),a.lineTo(i.x+n,i.y),s=Math.cos(Math.PI/4)*n,o=Math.sin(Math.PI/4)*n,a.moveTo(i.x-s,i.y-o),a.lineTo(i.x+s,i.y+o),a.moveTo(i.x-s,i.y+o),a.lineTo(i.x+s,i.y-o),a.closePath();break;case"line":a.beginPath(),a.moveTo(i.x-n,i.y),a.lineTo(i.x+n,i.y),a.closePath();break;case"dash":a.beginPath(),a.moveTo(i.x,i.y),a.lineTo(i.x+n,i.y),a.closePath()}a.stroke()}}}})}},{}],36:[function(t,e,i){"use strict";e.exports=function(t){t.helpers;t.defaults.global.elements.rectangle={backgroundColor:t.defaults.global.defaultColor,borderWidth:0,borderColor:t.defaults.global.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,a=i.width/2,s=i.x-a,o=i.x+a,n=i.base-(i.base-i.y),r=i.borderWidth/2;i.borderWidth&&(s+=r,o-=r,n+=r),e.beginPath(),e.fillStyle=i.backgroundColor,e.strokeStyle=i.borderColor,e.lineWidth=i.borderWidth;var l=[[s,i.base],[s,n],[o,n],[o,i.base]],h=["bottom","left","top","right"],c=h.indexOf(i.borderSkipped,0);-1===c&&(c=0),e.moveTo.apply(e,t(0));for(var u=1;4>u;u++)e.lineTo.apply(e,t(u));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,a=!1;return i&&(a=i.y=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),a},inLabelRange:function(t){var e=this._view;return e?t>=e.x-e.width/2&&t<=e.x+e.width/2:!1},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}})}},{}],37:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i={position:"bottom"},a=t.Scale.extend({buildTicks:function(t){this.startIndex=0,this.endIndex=this.chart.data.labels.length;var i;void 0!==this.options.ticks.min&&(i=e.indexOf(this.chart.data.labels,this.options.ticks.min),this.startIndex=-1!==i?i:this.startIndex),void 0!==this.options.ticks.max&&(i=e.indexOf(this.chart.data.labels,this.options.ticks.max),this.endIndex=-1!==i?i:this.endIndex),this.ticks=0===this.startIndex&&this.endIndex===this.chart.data.labels.length?this.chart.data.labels:this.chart.data.labels.slice(this.startIndex,this.endIndex+1)},getLabelForIndex:function(t,e){return this.ticks[t]},getPixelForValue:function(t,e,i,a){var s=Math.max(this.ticks.length-(this.options.gridLines.offsetGridLines?0:1),1);if(this.isHorizontal()){var o=this.width-(this.paddingLeft+this.paddingRight),n=o/s,r=n*(e-this.startIndex)+this.paddingLeft;return this.options.gridLines.offsetGridLines&&a&&(r+=n/2),this.left+Math.round(r)}var l=this.height-(this.paddingTop+this.paddingBottom),h=l/s,c=h*(e-this.startIndex)+this.paddingTop;return this.options.gridLines.offsetGridLines&&a&&(c+=h/2),this.top+Math.round(c)},getPixelForTick:function(t,e){return this.getPixelForValue(this.ticks[t],t+this.startIndex,null,e)}});t.scaleService.registerScaleType("category",a,i)}},{}],38:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i={position:"left",ticks:{callback:function(t,i,a){var s=a[1]-a[0];Math.abs(s)>1&&t!==Math.floor(t)&&(s=t-Math.floor(t));var o=e.log10(Math.abs(s)),n="";if(0!==t){var r=-1*Math.floor(o);r=Math.max(Math.min(r,20),0),n=t.toFixed(r)}else n="0";return n}}},a=t.Scale.extend({determineDataLimits:function(){if(this.min=null,this.max=null,this.options.stacked){var t={},i=!1,a=!1;e.each(this.chart.data.datasets,function(s){void 0===t[s.type]&&(t[s.type]={positiveValues:[],negativeValues:[]});var o=t[s.type].positiveValues,n=t[s.type].negativeValues;e.isDatasetVisible(s)&&(this.isHorizontal()?s.xAxisID===this.id:s.yAxisID===this.id)&&e.each(s.data,function(t,e){var s=+this.getRightValue(t);isNaN(s)||(o[e]=o[e]||0,n[e]=n[e]||0,this.options.relativePoints?o[e]=100:0>s?(a=!0,n[e]+=s):(i=!0,o[e]+=s))},this)},this),e.each(t,function(t){var i=t.positiveValues.concat(t.negativeValues),a=e.min(i),s=e.max(i);this.min=null===this.min?a:Math.min(this.min,a),this.max=null===this.max?s:Math.max(this.max,s)},this)}else e.each(this.chart.data.datasets,function(t){e.isDatasetVisible(t)&&(this.isHorizontal()?t.xAxisID===this.id:t.yAxisID===this.id)&&e.each(t.data,function(t,e){var i=+this.getRightValue(t);isNaN(i)||(null===this.min?this.min=i:ithis.max&&(this.max=i))},this)},this);if(this.options.ticks.beginAtZero){var s=e.sign(this.min),o=e.sign(this.max);0>s&&0>o?this.max=0:s>0&&o>0&&(this.min=0)}void 0!==this.options.ticks.min?this.min=this.options.ticks.min:void 0!==this.options.ticks.suggestedMin&&(this.min=Math.min(this.min,this.options.ticks.suggestedMin)),void 0!==this.options.ticks.max?this.max=this.options.ticks.max:void 0!==this.options.ticks.suggestedMax&&(this.max=Math.max(this.max,this.options.ticks.suggestedMax)),this.min===this.max&&(this.min--,this.max++)},buildTicks:function(){this.ticks=[];var i;if(this.isHorizontal())i=Math.min(this.options.ticks.maxTicksLimit?this.options.ticks.maxTicksLimit:11,Math.ceil(this.width/50));else{var a=e.getValueOrDefault(this.options.ticks.fontSize,t.defaults.global.defaultFontSize);i=Math.min(this.options.ticks.maxTicksLimit?this.options.ticks.maxTicksLimit:11,Math.ceil(this.height/(2*a)))}i=Math.max(2,i);var s,o=this.options.ticks.fixedStepSize&&this.options.ticks.fixedStepSize>0||this.options.ticks.stepSize&&this.options.ticks.stepSize>0;if(o)s=e.getValueOrDefault(this.options.ticks.fixedStepSize,this.options.ticks.stepSize);else{var n=e.niceNum(this.max-this.min,!1);s=e.niceNum(n/(i-1),!0)}var r=Math.floor(this.min/s)*s,l=Math.ceil(this.max/s)*s,h=(l-r)/s;h=e.almostEquals(h,Math.round(h),s/1e3)?Math.round(h):Math.ceil(h),this.ticks.push(void 0!==this.options.ticks.min?this.options.ticks.min:r);for(var c=1;h>c;++c)this.ticks.push(r+c*s);this.ticks.push(void 0!==this.options.ticks.max?this.options.ticks.max:l),("left"===this.options.position||"right"===this.options.position)&&this.ticks.reverse(),this.max=e.max(this.ticks),this.min=e.min(this.ticks),this.options.ticks.reverse?(this.ticks.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},convertTicksToLabels:function(){this.ticksAsNumbers=this.ticks.slice(),this.zeroLineIndex=this.ticks.indexOf(0),t.Scale.prototype.convertTicksToLabels.call(this)},getPixelForValue:function(t,e,i,a){var s,o=+this.getRightValue(t),n=this.end-this.start;if(this.isHorizontal()){var r=this.width-(this.paddingLeft+this.paddingRight);return s=this.left+r/n*(o-this.start),Math.round(s+this.paddingLeft)}var l=this.height-(this.paddingTop+this.paddingBottom);return s=this.bottom-this.paddingBottom-l/n*(o-this.start),Math.round(s)},getPixelForTick:function(t,e){return this.getPixelForValue(this.ticksAsNumbers[t],null,null,e)}});t.scaleService.registerScaleType("linear",a,i)}},{}],39:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i={position:"left",ticks:{callback:function(e,i,a){var s=e/Math.pow(10,Math.floor(t.helpers.log10(e)));return 1===s||2===s||5===s||0===i||i===a.length-1?e.toExponential():""}}},a=t.Scale.extend({determineDataLimits:function(){if(this.min=null,this.max=null,this.options.stacked){var t={};e.each(this.chart.data.datasets,function(i){e.isDatasetVisible(i)&&(this.isHorizontal()?i.xAxisID===this.id:i.yAxisID===this.id)&&(void 0===t[i.type]&&(t[i.type]=[]),e.each(i.data,function(e,a){var s=t[i.type],o=+this.getRightValue(e);isNaN(o)||(s[a]=s[a]||0,this.options.relativePoints?s[a]=100:s[a]+=o)},this))},this),e.each(t,function(t){var i=e.min(t),a=e.max(t);this.min=null===this.min?i:Math.min(this.min,i),this.max=null===this.max?a:Math.max(this.max,a)},this)}else e.each(this.chart.data.datasets,function(t){e.isDatasetVisible(t)&&(this.isHorizontal()?t.xAxisID===this.id:t.yAxisID===this.id)&&e.each(t.data,function(t,e){var i=+this.getRightValue(t);isNaN(i)||(null===this.min?this.min=i:ithis.max&&(this.max=i))},this)},this);this.min=void 0!==this.options.ticks.min?this.options.ticks.min:this.min,this.max=void 0!==this.options.ticks.max?this.options.ticks.max:this.max,this.min===this.max&&(0!==this.min&&null!==this.min?(this.min=Math.pow(10,Math.floor(e.log10(this.min))-1),this.max=Math.pow(10,Math.floor(e.log10(this.max))+1)):(this.min=1,this.max=10))},buildTicks:function(){this.ticks=[];for(var t=void 0!==this.options.ticks.min?this.options.ticks.min:Math.pow(10,Math.floor(e.log10(this.min)));tthis.max&&(this.max=i))},this)},this),this.options.ticks.beginAtZero){var t=e.sign(this.min),i=e.sign(this.max);0>t&&0>i?this.max=0:t>0&&i>0&&(this.min=0)}void 0!==this.options.ticks.min?this.min=this.options.ticks.min:void 0!==this.options.ticks.suggestedMin&&(this.min=Math.min(this.min,this.options.ticks.suggestedMin)),void 0!==this.options.ticks.max?this.max=this.options.ticks.max:void 0!==this.options.ticks.suggestedMax&&(this.max=Math.max(this.max,this.options.ticks.suggestedMax)),this.min===this.max&&(this.min--,this.max++)},buildTicks:function(){this.ticks=[];var i=e.getValueOrDefault(this.options.ticks.fontSize,t.defaults.global.defaultFontSize),a=Math.min(this.options.ticks.maxTicksLimit?this.options.ticks.maxTicksLimit:11,Math.ceil(this.drawingArea/(1.5*i)));a=Math.max(2,a);var s=e.niceNum(this.max-this.min,!1),o=e.niceNum(s/(a-1),!0),n=Math.floor(this.min/o)*o,r=Math.ceil(this.max/o)*o,l=Math.ceil((r-n)/o);this.ticks.push(void 0!==this.options.ticks.min?this.options.ticks.min:n);for(var h=1;l>h;++h)this.ticks.push(n+h*o);this.ticks.push(void 0!==this.options.ticks.max?this.options.ticks.max:r),this.max=e.max(this.ticks),this.min=e.min(this.ticks),this.options.ticks.reverse?(this.ticks.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),this.zeroLineIndex=this.ticks.indexOf(0)},convertTicksToLabels:function(){t.Scale.prototype.convertTicksToLabels.call(this),this.pointLabels=this.chart.data.labels.map(this.options.pointLabels.callback,this)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var i,a,s,o,n,r,l,h,c,u,d,f,g=e.getValueOrDefault(this.options.pointLabels.fontSize,t.defaults.global.defaultFontSize),m=e.getValueOrDefault(this.options.pointLabels.fontStyle,t.defaults.global.defaultFontStyle),p=e.getValueOrDefault(this.options.pointLabels.fontFamily,t.defaults.global.defaultFontFamily),b=e.fontString(g,m,p),v=e.min([this.height/2-g-5,this.width/2]),x=this.width,y=0;for(this.ctx.font=b,a=0;ax&&(x=i.x+o,n=a),i.x-ox&&(x=i.x+s,n=a):a>this.getValueCount()/2&&i.x-s0||this.options.reverse){var o=this.getDistanceFromCenterForValue(this.ticks[s]),n=this.yCenter-o;if(this.options.gridLines.display)if(i.strokeStyle=this.options.gridLines.color,i.lineWidth=this.options.gridLines.lineWidth,this.options.lineArc)i.beginPath(),i.arc(this.xCenter,this.yCenter,o,0,2*Math.PI),i.closePath(),i.stroke();else{i.beginPath();for(var r=0;r=0;a--){if(this.options.angleLines.display){var s=this.getPointPosition(a,this.getDistanceFromCenterForValue(this.options.reverse?this.min:this.max));i.beginPath(),i.moveTo(this.xCenter,this.yCenter),i.lineTo(s.x,s.y),i.stroke(),i.closePath()}var o=this.getPointPosition(a,this.getDistanceFromCenterForValue(this.options.reverse?this.min:this.max)+5),n=e.getValueOrDefault(this.options.pointLabels.fontColor,t.defaults.global.defaultFontColor),r=e.getValueOrDefault(this.options.pointLabels.fontSize,t.defaults.global.defaultFontSize),l=e.getValueOrDefault(this.options.pointLabels.fontStyle,t.defaults.global.defaultFontStyle),h=e.getValueOrDefault(this.options.pointLabels.fontFamily,t.defaults.global.defaultFontFamily),c=e.fontString(r,l,h);i.font=c,i.fillStyle=n;var u=this.pointLabels.length,d=this.pointLabels.length/2,f=d/2,g=f>a||a>u-f,m=a===f||a===u-f;0===a?i.textAlign="center":a===d?i.textAlign="center":d>a?i.textAlign="left":i.textAlign="right",m?i.textBaseline="middle":g?i.textBaseline="bottom":i.textBaseline="top",i.fillText(this.pointLabels[a]?this.pointLabels[a]:"",o.x,o.y)}}}}});t.scaleService.registerScaleType("radialLinear",a,i)}},{}],41:[function(t,e,i){"use strict";var a=t("moment");a="function"==typeof a?a:window.moment,e.exports=function(t){var e=t.helpers,i={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}]},s={position:"bottom",time:{parser:!1,format:!1,unit:!1,round:!1,displayFormat:!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(!a)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 this.labelMoments[t][e]},determineDataLimits:function(){this.labelMoments=[];var t=[];this.chart.data.labels&&this.chart.data.labels.length>0?(e.each(this.chart.data.labels,function(e,i){var a=this.parseTime(e);this.options.time.round&&a.startOf(this.options.time.round),t.push(a)},this),this.firstTick=a.min.call(this,t),this.lastTick=a.max.call(this,t)):(this.firstTick=null,this.lastTick=null),e.each(this.chart.data.datasets,function(i,s){var o=[];"object"==typeof i.data[0]?e.each(i.data,function(t,e){var i=this.parseTime(this.getRightValue(t));this.options.time.round&&i.startOf(this.options.time.round),o.push(i),this.firstTick=null!==this.firstTick?a.min(this.firstTick,i):i,this.lastTick=null!==this.lastTick?a.max(this.lastTick,i):i},this):o=t,this.labelMoments.push(o)},this),this.options.time.min&&(this.firstTick=this.parseTime(this.options.time.min)),this.options.time.max&&(this.lastTick=this.parseTime(this.options.time.max)),this.firstTick=(this.firstTick||a()).clone(),this.lastTick=(this.lastTick||a()).clone()},buildTicks:function(a){this.ctx.save();var s=e.getValueOrDefault(this.options.ticks.fontSize,t.defaults.global.defaultFontSize),o=e.getValueOrDefault(this.options.ticks.fontStyle,t.defaults.global.defaultFontStyle),n=e.getValueOrDefault(this.options.ticks.fontFamily,t.defaults.global.defaultFontFamily),r=e.fontString(s,o,n);if(this.ctx.font=r,this.ticks=[],this.unitScale=1,this.scaleSizeInUnits=0,this.options.time.unit)this.tickUnit=this.options.time.unit||"day",this.displayFormat=this.options.time.displayFormats[this.tickUnit],this.scaleSizeInUnits=this.lastTick.diff(this.firstTick,this.tickUnit,!0),this.unitScale=e.getValueOrDefault(this.options.time.unitStepSize,1);else{var l=this.isHorizontal()?this.width-(this.paddingLeft+this.paddingRight):this.height-(this.paddingTop+this.paddingBottom),h=this.tickFormatFunction(this.firstTick,0,[]),c=this.ctx.measureText(h).width,u=Math.cos(e.toRadians(this.options.ticks.maxRotation)),d=Math.sin(e.toRadians(this.options.ticks.maxRotation));c=c*u+s*d;var f=l/c;this.tickUnit="millisecond",this.scaleSizeInUnits=this.lastTick.diff(this.firstTick,this.tickUnit,!0),this.displayFormat=this.options.time.displayFormats[this.tickUnit];for(var g=0,m=i.units[g];g=Math.ceil(this.scaleSizeInUnits/f)){this.unitScale=e.getValueOrDefault(this.options.time.unitStepSize,m.steps[p]);break}break}if(m.maxStep===!1||Math.ceil(this.scaleSizeInUnits/f)=0)break;v%this.unitScale===0&&this.ticks.push(x)}(0!==this.ticks[this.ticks.length-1].diff(this.lastTick,this.tickUnit)||0===this.scaleSizeInUnits)&&(this.options.time.max?(this.ticks.push(this.lastTick.clone()),this.scaleSizeInUnits=this.lastTick.diff(this.ticks[0],this.tickUnit,!0)):(this.scaleSizeInUnits=Math.ceil(this.scaleSizeInUnits/this.unitScale)*this.unitScale,this.ticks.push(this.firstTick.clone().add(this.scaleSizeInUnits,this.tickUnit)),this.lastTick=this.ticks[this.ticks.length-1].clone())),this.ctx.restore()},getLabelForIndex:function(t,e){var i=this.chart.data.labels&&t Date: Wed, 20 Apr 2016 17:10:35 +0200 Subject: [PATCH 07/34] New translations [skip ci] --- resources/lang/en_US/firefly.php | 14 +++++++++++++- resources/views/accounts/edit.twig | 2 +- resources/views/bills/show.twig | 29 +++++++++++++++-------------- 3 files changed, 29 insertions(+), 16 deletions(-) diff --git a/resources/lang/en_US/firefly.php b/resources/lang/en_US/firefly.php index 8c9206bfe1..a35e74c3b0 100644 --- a/resources/lang/en_US/firefly.php +++ b/resources/lang/en_US/firefly.php @@ -69,7 +69,7 @@ return [ 'warning_much_data' => ':days days of data may take a while to load.', 'registered' => 'You have registered successfully!', 'search' => 'Search', - 'no_budget_pointer' => 'You seem to have no budgets yet. You should create some on the budgets-page. Budgets can help you keep track of expenses.', + 'no_budget_pointer' => 'You seem to have no budgets yet. You should create some on the budgets-page. Budgets can help you keep track of expenses.', // account confirmation: 'confirm_account_header' => 'Please confirm your account', @@ -462,9 +462,18 @@ return [ 'update_budget' => 'Update budget', // bills: + 'matching_on' => 'Matching on', + 'between_amounts' => 'between :low and :high.', + 'repeats' => 'Repeats', + 'connected_journals' => 'Connected transaction journals', + 'auto_match_on' => 'Automatically matched by Firefly', + 'auto_match_off' => 'Not automatically matched by Firefly', + 'next_expected_match' => 'Next expected match', 'delete_bill' => 'Delete bill ":name"', 'deleted_bill' => 'Deleted bill ":name"', 'edit_bill' => 'Edit bill ":name"', + 'more' => 'More', + 'rescan_old' => 'Rescan old transactions', 'update_bill' => 'Update bill', 'updated_bill' => 'Updated bill ":name"', 'store_new_bill' => 'Store new bill', @@ -508,6 +517,7 @@ return [ 'save_transactions_by_moving' => 'Save these transaction(s) by moving them to another account:', 'stored_new_account' => 'New account ":name" stored!', 'updated_account' => 'Updated account ":name"', + 'credit_card_options' => 'Credit card options', // categories: 'new_category' => 'New category', @@ -642,6 +652,7 @@ return [ 'noCategory' => '(no category)', 'notCharged' => 'Not charged (yet)', 'inactive' => 'Inactive', + 'active' => 'Active', 'difference' => 'Difference', 'in' => 'In', 'out' => 'Out', @@ -674,6 +685,7 @@ return [ 'audit_end_balance' => 'Account balance of :account_name at the end of :end was: :balance', // charts: + 'chart' => 'Chart', 'dayOfMonth' => 'Day of the month', 'month' => 'Month', 'budget' => 'Budget', diff --git a/resources/views/accounts/edit.twig b/resources/views/accounts/edit.twig index 92f3065e75..5e31575226 100644 --- a/resources/views/accounts/edit.twig +++ b/resources/views/accounts/edit.twig @@ -45,7 +45,7 @@ {% if Session.get('preFilled').accountRole == 'ccAsset' %}
-

Credit card options

+

{{ 'credit_card_options'|_ }}

{{ ExpandedForm.select('ccType',Config.get('firefly.ccTypes')) }} diff --git a/resources/views/bills/show.twig b/resources/views/bills/show.twig index 3cfebbd4b5..af0b2d7c29 100644 --- a/resources/views/bills/show.twig +++ b/resources/views/bills/show.twig @@ -13,15 +13,15 @@

{{ bill.name }}

{% if bill.active %} - + {% else %} - + {% endif %} {% if bill.automatch %} - + {% else %} - + {% endif %} @@ -30,8 +30,8 @@
@@ -41,17 +41,18 @@ - + From b097e2910449033318a6ffcae356740eeff62238 Mon Sep 17 00:00:00 2001 From: James Cole Date: Thu, 21 Apr 2016 08:59:15 +0200 Subject: [PATCH 09/34] New preference for page size. --- .../Controllers/PreferencesController.php | 37 ++++++++++++------- resources/views/preferences/index.twig | 17 ++++++++- 2 files changed, 39 insertions(+), 15 deletions(-) diff --git a/app/Http/Controllers/PreferencesController.php b/app/Http/Controllers/PreferencesController.php index e84245a4d6..8a04819529 100644 --- a/app/Http/Controllers/PreferencesController.php +++ b/app/Http/Controllers/PreferencesController.php @@ -64,25 +64,26 @@ class PreferencesController extends Controller */ public function index(ARI $repository) { - $accounts = $repository->getAccounts(['Default account', 'Asset account']); - $viewRangePref = Preferences::get('viewRange', '1M'); - $viewRange = $viewRangePref->data; - $frontPageAccounts = Preferences::get('frontPageAccounts', []); - $budgetMax = Preferences::get('budgetMaximum', 1000); - $language = Preferences::get('language', env('DEFAULT_LANGUAGE', 'en_US'))->data; - $budgetMaximum = $budgetMax->data; - $customFiscalYear = Preferences::get('customFiscalYear', 0)->data; - $fiscalYearStartStr = Preferences::get('fiscalYearStart', '01-01')->data; - $fiscalYearStart = date('Y') . '-' . $fiscalYearStartStr; - $is2faEnabled = Preferences::get('twoFactorAuthEnabled', 0)->data; // twoFactorAuthEnabled - $has2faSecret = !is_null(Preferences::get('twoFactorAuthSecret')); // hasTwoFactorAuthSecret - $showIncomplete = env('SHOW_INCOMPLETE_TRANSLATIONS', false) === true; + $accounts = $repository->getAccounts(['Default account', 'Asset account']); + $viewRangePref = Preferences::get('viewRange', '1M'); + $viewRange = $viewRangePref->data; + $frontPageAccounts = Preferences::get('frontPageAccounts', []); + $budgetMax = Preferences::get('budgetMaximum', 1000); + $language = Preferences::get('language', env('DEFAULT_LANGUAGE', 'en_US'))->data; + $budgetMaximum = $budgetMax->data; + $transactionPageSize = Preferences::get('transactionPageSize', 50)->data; + $customFiscalYear = Preferences::get('customFiscalYear', 0)->data; + $fiscalYearStartStr = Preferences::get('fiscalYearStart', '01-01')->data; + $fiscalYearStart = date('Y') . '-' . $fiscalYearStartStr; + $is2faEnabled = Preferences::get('twoFactorAuthEnabled', 0)->data; // twoFactorAuthEnabled + $has2faSecret = !is_null(Preferences::get('twoFactorAuthSecret')); // hasTwoFactorAuthSecret + $showIncomplete = env('SHOW_INCOMPLETE_TRANSLATIONS', false) === true; return view( 'preferences.index', compact( 'budgetMaximum', 'language', 'accounts', 'frontPageAccounts', - 'viewRange', 'customFiscalYear', 'fiscalYearStart', 'is2faEnabled', + 'viewRange', 'customFiscalYear', 'transactionPageSize', 'fiscalYearStart', 'is2faEnabled', 'has2faSecret', 'showIncomplete' ) ); @@ -135,6 +136,14 @@ class PreferencesController extends Controller Preferences::set('customFiscalYear', $customFiscalYear); Preferences::set('fiscalYearStart', $fiscalYearStart); + // save page size: + $transactionPageSize = intval(Input::get('transactionPageSize')); + if($transactionPageSize > 0 && $transactionPageSize < 1337) { + Preferences::set('transactionPageSize', $transactionPageSize); + } else { + Preferences::set('transactionPageSize', 50); + } + // two factor auth $twoFactorAuthEnabled = intval(Input::get('twoFactorAuthEnabled')); $hasTwoFactorAuthSecret = !is_null(Preferences::get('twoFactorAuthSecret')); diff --git a/resources/views/preferences/index.twig b/resources/views/preferences/index.twig index a78117cacf..549a690594 100644 --- a/resources/views/preferences/index.twig +++ b/resources/views/preferences/index.twig @@ -42,7 +42,7 @@

{{ 'pref_budget_settings_help'|_ }}

- {{ ExpandedForm.amount('budgetMaximum',budgetMaximum,{'label' : 'Budget maximum'}) }} + {{ ExpandedForm.amount('budgetMaximum',budgetMaximum,{'label' : 'budget_maximum'|_}) }}
@@ -138,6 +138,21 @@
+ + +
+
+
+

{{ 'transaction_page_size_title'|_ }}

+
+
+

{{ 'transaction_page_size_help'|_ }}

+ {{ ExpandedForm.integer('transactionPageSize',transactionPageSize,{'label' : 'transaction_page_size_label'|_}) }} +
+
+
+ +
From e293d6979837de7ec9b5beb91dc34eda00e31d7b Mon Sep 17 00:00:00 2001 From: James Cole Date: Thu, 21 Apr 2016 08:59:31 +0200 Subject: [PATCH 10/34] Take page size into account. --- app/Http/Controllers/AccountController.php | 3 ++- app/Repositories/Account/AccountRepository.php | 9 +++++---- app/Repositories/Account/AccountRepositoryInterface.php | 6 +++--- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/app/Http/Controllers/AccountController.php b/app/Http/Controllers/AccountController.php index e16a91807b..969adeb3c3 100644 --- a/app/Http/Controllers/AccountController.php +++ b/app/Http/Controllers/AccountController.php @@ -189,9 +189,10 @@ class AccountController extends Controller public function show(ARI $repository, Account $account) { $page = intval(Input::get('page')) == 0 ? 1 : intval(Input::get('page')); + $pageSize = Preferences::get('transactionPageSize', 50)->data; $subTitleIcon = Config::get('firefly.subTitlesByIdentifier.' . $account->accountType->type); $what = Config::get('firefly.shortNamesByFullName.' . $account->accountType->type); - $journals = $repository->getJournals($account, $page); + $journals = $repository->getJournals($account, $page, $pageSize); $subTitle = trans('firefly.details_for_' . $what, ['name' => $account->name]); $journals->setPath('accounts/show/' . $account->id); diff --git a/app/Repositories/Account/AccountRepository.php b/app/Repositories/Account/AccountRepository.php index 5de3ef5e38..c07260159d 100644 --- a/app/Repositories/Account/AccountRepository.php +++ b/app/Repositories/Account/AccountRepository.php @@ -282,12 +282,13 @@ class AccountRepository implements AccountRepositoryInterface /** * @param Account $account * @param int $page + * @param int $pageSize * * @return LengthAwarePaginator */ - public function getJournals(Account $account, int $page): LengthAwarePaginator + public function getJournals(Account $account, int $page, int $pageSize = 50): LengthAwarePaginator { - $offset = ($page - 1) * 50; + $offset = ($page - 1) * $pageSize; $query = $this->user ->transactionJournals() ->expanded() @@ -298,8 +299,8 @@ class AccountRepository implements AccountRepositoryInterface ->orderBy('transaction_journals.id', 'DESC'); $count = $query->count(); - $set = $query->take(50)->offset($offset)->get(TransactionJournal::QUERYFIELDS); - $paginator = new LengthAwarePaginator($set, $count, 50, $page); + $set = $query->take($pageSize)->offset($offset)->get(TransactionJournal::QUERYFIELDS); + $paginator = new LengthAwarePaginator($set, $count, $pageSize, $page); return $paginator; diff --git a/app/Repositories/Account/AccountRepositoryInterface.php b/app/Repositories/Account/AccountRepositoryInterface.php index 68fb208b0b..7eed5eb3a3 100644 --- a/app/Repositories/Account/AccountRepositoryInterface.php +++ b/app/Repositories/Account/AccountRepositoryInterface.php @@ -123,11 +123,11 @@ interface AccountRepositoryInterface /** * @param Account $account - * @param $page - * + * @param int $page + * @param int $pageSize * @return LengthAwarePaginator */ - public function getJournals(Account $account, int $page): LengthAwarePaginator; + public function getJournals(Account $account, int $page, int $pageSize = 50): LengthAwarePaginator; /** * @param Account $account From 98c057c516cd2229dd1717d91a3c6043df7458d5 Mon Sep 17 00:00:00 2001 From: James Cole Date: Thu, 21 Apr 2016 09:00:32 +0200 Subject: [PATCH 11/34] Take page size into account. --- app/Http/Controllers/BudgetController.php | 10 ++++++--- app/Repositories/Budget/BudgetRepository.php | 21 +++++++++++++------ .../Budget/BudgetRepositoryInterface.php | 6 ++++-- resources/views/accounts/show.twig | 2 +- 4 files changed, 27 insertions(+), 12 deletions(-) diff --git a/app/Http/Controllers/BudgetController.php b/app/Http/Controllers/BudgetController.php index 6223216e17..9a09af51a3 100644 --- a/app/Http/Controllers/BudgetController.php +++ b/app/Http/Controllers/BudgetController.php @@ -194,7 +194,9 @@ class BudgetController extends Controller /** @var Carbon $end */ $end = session('end', Carbon::now()->endOfMonth()); - $list = $repository->getWithoutBudget($start, $end); + $page = intval(Input::get('page')) == 0 ? 1 : intval(Input::get('page')); + $pageSize = Preferences::get('transactionPageSize', 50)->data; + $list = $repository->getWithoutBudget($start, $end, $page, $pageSize); $subTitle = trans( 'firefly.without_budget_between', ['start' => $start->formatLocalized($this->monthAndDayFormat), 'end' => $end->formatLocalized($this->monthAndDayFormat)] @@ -235,18 +237,21 @@ class BudgetController extends Controller throw new FireflyException('This budget limit is not part of this budget.'); } - $journals = $repository->getJournals($budget, $repetition, 50); + $pageSize = Preferences::get('transactionPageSize', 50)->data; + $journals = $repository->getJournals($budget, $repetition, $pageSize); if (is_null($repetition->id)) { $start = $repository->firstActivity($budget); $end = new Carbon; $set = $budget->limitrepetitions()->orderBy('startdate', 'DESC')->get(); $subTitle = e($budget->name); + $journals->setPath('/budgets/show/' . $budget->id); } else { $start = $repetition->startdate; $end = $repetition->enddate; $set = new Collection([$repetition]); $subTitle = trans('firefly.budget_in_month', ['name' => $budget->name, 'month' => $repetition->startdate->formatLocalized($this->monthFormat)]); + $journals->setPath('/budgets/show/' . $budget->id . '/' . $repetition->id); } $spentArray = $repository->spentPerDay($budget, $start, $end); @@ -258,7 +263,6 @@ class BudgetController extends Controller $limits->push($entry); } - $journals->setPath('/budgets/show/' . $budget->id); return view('budgets.show', compact('limits', 'budget', 'repetition', 'journals', 'subTitle')); } diff --git a/app/Repositories/Budget/BudgetRepository.php b/app/Repositories/Budget/BudgetRepository.php index fee7ec4421..bb2b0ee851 100644 --- a/app/Repositories/Budget/BudgetRepository.php +++ b/app/Repositories/Budget/BudgetRepository.php @@ -60,6 +60,7 @@ class BudgetRepository extends ComponentRepository implements BudgetRepositoryIn { // delete limits with amount 0: BudgetLimit::where('amount', 0)->delete(); + return true; } @@ -411,7 +412,7 @@ class BudgetRepository extends ComponentRepository implements BudgetRepositoryIn ->where('limit_repetitions.startdate', $start->format('Y-m-d 00:00:00')) ->where('limit_repetitions.enddate', $end->format('Y-m-d 00:00:00')) ->first(['limit_repetitions.*']); - if(is_null($data)) { + if (is_null($data)) { return new LimitRepetition; } @@ -540,20 +541,28 @@ class BudgetRepository extends ComponentRepository implements BudgetRepositoryIn /** * @param Carbon $start * @param Carbon $end + * @param int $page + * @param int $pageSize * - * @return Collection + * @return LengthAwarePaginator */ - public function getWithoutBudget(Carbon $start, Carbon $end): Collection + public function getWithoutBudget(Carbon $start, Carbon $end, int $page, int $pageSize = 50): LengthAwarePaginator { - return $this->user + $offset = ($page - 1) * $pageSize; + $query = $this->user ->transactionjournals() ->expanded() ->where('transaction_types.type', TransactionType::WITHDRAWAL) ->leftJoin('budget_transaction_journal', 'budget_transaction_journal.transaction_journal_id', '=', 'transaction_journals.id') ->whereNull('budget_transaction_journal.id') ->before($end) - ->after($start) - ->get(TransactionJournal::QUERYFIELDS); + ->after($start); + + $count = $query->count(); + $set = $query->take($pageSize)->offset($offset)->get(TransactionJournal::QUERYFIELDS); + $paginator = new LengthAwarePaginator($set, $count, $pageSize, $page); + + return $paginator; } /** diff --git a/app/Repositories/Budget/BudgetRepositoryInterface.php b/app/Repositories/Budget/BudgetRepositoryInterface.php index 4d6e55cd52..b7ea891594 100644 --- a/app/Repositories/Budget/BudgetRepositoryInterface.php +++ b/app/Repositories/Budget/BudgetRepositoryInterface.php @@ -204,10 +204,12 @@ interface BudgetRepositoryInterface /** * @param Carbon $start * @param Carbon $end + * @param int $page + * @param int $pageSize * - * @return Collection + * @return LengthAwarePaginator */ - public function getWithoutBudget(Carbon $start, Carbon $end): Collection; + public function getWithoutBudget(Carbon $start, Carbon $end, int $page, int $pageSize = 50): LengthAwarePaginator; /** * @param Collection $accounts diff --git a/resources/views/accounts/show.twig b/resources/views/accounts/show.twig index afb7876f7d..da328548ea 100644 --- a/resources/views/accounts/show.twig +++ b/resources/views/accounts/show.twig @@ -38,7 +38,7 @@

{{ 'transactions'|_ }}

- {% include 'list/journals.twig' with {sorting:true} %} + {% include 'list/journals' with {sorting:true} %}
From 13e59105eca1398b642d091ca859732681c0a45b Mon Sep 17 00:00:00 2001 From: James Cole Date: Thu, 21 Apr 2016 09:01:34 +0200 Subject: [PATCH 12/34] Set correct path. [skip ci] --- app/Http/Controllers/BudgetController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Http/Controllers/BudgetController.php b/app/Http/Controllers/BudgetController.php index 9a09af51a3..0d79d6a3b8 100644 --- a/app/Http/Controllers/BudgetController.php +++ b/app/Http/Controllers/BudgetController.php @@ -201,6 +201,7 @@ class BudgetController extends Controller 'firefly.without_budget_between', ['start' => $start->formatLocalized($this->monthAndDayFormat), 'end' => $end->formatLocalized($this->monthAndDayFormat)] ); + $list->setPath('/budgets/list/noBudget'); return view('budgets.noBudget', compact('list', 'subTitle')); } From 23c0bb49c443cdf214e8f33b90d068ce7bb113ab Mon Sep 17 00:00:00 2001 From: James Cole Date: Thu, 21 Apr 2016 09:04:19 +0200 Subject: [PATCH 13/34] Take page size into account. [skip ci] --- app/Http/Controllers/CategoryController.php | 5 +++-- app/Repositories/Category/SingleCategoryRepository.php | 7 ++++--- .../Category/SingleCategoryRepositoryInterface.php | 3 ++- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/app/Http/Controllers/CategoryController.php b/app/Http/Controllers/CategoryController.php index 8bac8029d2..7848cf2529 100644 --- a/app/Http/Controllers/CategoryController.php +++ b/app/Http/Controllers/CategoryController.php @@ -155,11 +155,12 @@ class CategoryController extends Controller public function show(SCRI $repository, Category $category) { $hideCategory = true; // used in list. + $pageSize = Preferences::get('transactionPageSize', 50)->data; $page = intval(Input::get('page')); - $set = $repository->getJournals($category, $page); + $set = $repository->getJournals($category, $page, $pageSize); $count = $repository->countJournals($category); $subTitle = $category->name; - $journals = new LengthAwarePaginator($set, $count, 50, $page); + $journals = new LengthAwarePaginator($set, $count, $pageSize, $page); $journals->setPath('categories/show/' . $category->id); // list of ranges for list of periods: diff --git a/app/Repositories/Category/SingleCategoryRepository.php b/app/Repositories/Category/SingleCategoryRepository.php index ea7dd6fc29..4025ada2ca 100644 --- a/app/Repositories/Category/SingleCategoryRepository.php +++ b/app/Repositories/Category/SingleCategoryRepository.php @@ -138,14 +138,15 @@ class SingleCategoryRepository extends ComponentRepository implements SingleCate /** * @param Category $category * @param int $page + * @param int $pageSize * * @return Collection */ - public function getJournals(Category $category, $page): Collection + public function getJournals(Category $category, int $page, int $pageSize = 50): Collection { - $offset = $page > 0 ? $page * 50 : 0; + $offset = $page > 0 ? $page * $pageSize : 0; - return $category->transactionjournals()->expanded()->take(50)->offset($offset) + return $category->transactionjournals()->expanded()->take($pageSize)->offset($offset) ->orderBy('transaction_journals.date', 'DESC') ->orderBy('transaction_journals.order', 'ASC') ->orderBy('transaction_journals.id', 'DESC') diff --git a/app/Repositories/Category/SingleCategoryRepositoryInterface.php b/app/Repositories/Category/SingleCategoryRepositoryInterface.php index 29649457be..7219b8980c 100644 --- a/app/Repositories/Category/SingleCategoryRepositoryInterface.php +++ b/app/Repositories/Category/SingleCategoryRepositoryInterface.php @@ -74,10 +74,11 @@ interface SingleCategoryRepositoryInterface /** * @param Category $category * @param int $page + * @param int $pageSize * * @return Collection */ - public function getJournals(Category $category, $page): Collection; + public function getJournals(Category $category, int $page, int $pageSize = 50): Collection; /** * @param Category $category From 2bb883219c55c815a1bcf522dafd696a7df3757e Mon Sep 17 00:00:00 2001 From: James Cole Date: Thu, 21 Apr 2016 09:10:37 +0200 Subject: [PATCH 14/34] Take page size into account. --- app/Http/Controllers/CategoryController.php | 5 +++-- app/Repositories/Category/SingleCategoryRepository.php | 10 ++++++---- .../Category/SingleCategoryRepositoryInterface.php | 7 ++++--- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/app/Http/Controllers/CategoryController.php b/app/Http/Controllers/CategoryController.php index 7848cf2529..6b1456a5fa 100644 --- a/app/Http/Controllers/CategoryController.php +++ b/app/Http/Controllers/CategoryController.php @@ -226,10 +226,11 @@ class CategoryController extends Controller $hideCategory = true; // used in list. $page = intval(Input::get('page')); + $pageSize = Preferences::get('transactionPageSize', 50)->data; - $set = $repository->getJournalsInRange($category, $page, $start, $end); + $set = $repository->getJournalsInRange($category, $start, $end, $page, $pageSize); $count = $repository->countJournalsInRange($category, $start, $end); - $journals = new LengthAwarePaginator($set, $count, 50, $page); + $journals = new LengthAwarePaginator($set, $count, $pageSize, $page); $journals->setPath('categories/show/' . $category->id . '/' . $date); return view('categories.show_with_date', compact('category', 'journals', 'hideCategory', 'subTitle', 'carbon')); diff --git a/app/Repositories/Category/SingleCategoryRepository.php b/app/Repositories/Category/SingleCategoryRepository.php index 4025ada2ca..57509641c9 100644 --- a/app/Repositories/Category/SingleCategoryRepository.php +++ b/app/Repositories/Category/SingleCategoryRepository.php @@ -178,21 +178,23 @@ class SingleCategoryRepository extends ComponentRepository implements SingleCate /** * @param Category $category - * @param int $page * @param Carbon $start * @param Carbon $end + * @param int $page + * @param int $pageSize + * * * @return Collection */ - public function getJournalsInRange(Category $category, $page, Carbon $start, Carbon $end): Collection + public function getJournalsInRange(Category $category, Carbon $start, Carbon $end, int $page, int $pageSize = 50): Collection { - $offset = $page > 0 ? $page * 50 : 0; + $offset = $page > 0 ? $page * $pageSize : 0; return $category->transactionjournals() ->after($start) ->before($end) ->expanded() - ->take(50) + ->take($pageSize) ->offset($offset) ->get(TransactionJournal::QUERYFIELDS); } diff --git a/app/Repositories/Category/SingleCategoryRepositoryInterface.php b/app/Repositories/Category/SingleCategoryRepositoryInterface.php index 7219b8980c..011fc522a1 100644 --- a/app/Repositories/Category/SingleCategoryRepositoryInterface.php +++ b/app/Repositories/Category/SingleCategoryRepositoryInterface.php @@ -93,14 +93,15 @@ interface SingleCategoryRepositoryInterface /** * @param Category $category - * @param int $page - * * @param Carbon $start * @param Carbon $end + * @param int $page + * @param int $pageSize + * * * @return Collection */ - public function getJournalsInRange(Category $category, $page, Carbon $start, Carbon $end): Collection; + public function getJournalsInRange(Category $category, Carbon $start, Carbon $end, int $page, int $pageSize = 50): Collection; /** * @param Category $category From ef48a79d0c944d3e2d7bdc823f47211d548b9679 Mon Sep 17 00:00:00 2001 From: James Cole Date: Thu, 21 Apr 2016 10:23:19 +0200 Subject: [PATCH 15/34] Take page size into account. [skip ci] --- app/Http/Controllers/BillController.php | 5 +++- app/Repositories/Bill/BillRepository.php | 27 ++++++++++++------- .../Bill/BillRepositoryInterface.php | 8 ++++-- resources/views/bills/show.twig | 2 +- 4 files changed, 28 insertions(+), 14 deletions(-) diff --git a/app/Http/Controllers/BillController.php b/app/Http/Controllers/BillController.php index 87be25b6e6..2d644726dc 100644 --- a/app/Http/Controllers/BillController.php +++ b/app/Http/Controllers/BillController.php @@ -174,7 +174,10 @@ class BillController extends Controller */ public function show(BillRepositoryInterface $repository, Bill $bill) { - $journals = $repository->getJournals($bill); + $page = intval(Input::get('page')) == 0 ? 1 : intval(Input::get('page')); + $pageSize = Preferences::get('transactionPageSize', 50)->data; + $journals = $repository->getJournals($bill, $page, $pageSize); + $journals->setPath('/bills/show/' . $bill->id); $bill->nextExpectedMatch = $repository->nextExpectedMatch($bill); $hideBill = true; $subTitle = e($bill->name); diff --git a/app/Repositories/Bill/BillRepository.php b/app/Repositories/Bill/BillRepository.php index b371d9df23..44bafbd58b 100644 --- a/app/Repositories/Bill/BillRepository.php +++ b/app/Repositories/Bill/BillRepository.php @@ -13,6 +13,7 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\User; use Illuminate\Database\Query\Builder; use Illuminate\Database\Query\JoinClause; +use Illuminate\Pagination\LengthAwarePaginator; use Illuminate\Support\Collection; use Navigation; @@ -77,7 +78,7 @@ class BillRepository implements BillRepositoryInterface ->get( [ 'bills.*', - DB::raw('((`bills`.`amount_min` + `bills`.`amount_max`) / 2) as `expectedAmount`'), + DB::raw('((`bills`.`amount_min` + `bills`.`amount_max`) / 2) as `expectedAmount`'), ] )->sortBy('name'); @@ -304,18 +305,24 @@ class BillRepository implements BillRepositoryInterface * * @param Bill $bill * - * @return Collection + * @param int $page + * @param int $pageSize + * + * @return LengthAwarePaginator|Collection */ - public function getJournals(Bill $bill): Collection + public function getJournals(Bill $bill, int $page, int $pageSize = 50): LengthAwarePaginator { - $set = $bill->transactionjournals() - ->expanded() - ->orderBy('transaction_journals.date', 'DESC') - ->orderBy('transaction_journals.order', 'ASC') - ->orderBy('transaction_journals.id', 'DESC') - ->get(TransactionJournal::QUERYFIELDS); + $offset = ($page - 1) * $pageSize; + $query = $bill->transactionjournals() + ->expanded() + ->orderBy('transaction_journals.date', 'DESC') + ->orderBy('transaction_journals.order', 'ASC') + ->orderBy('transaction_journals.id', 'DESC'); + $count = $query->count(); + $set = $query->take($pageSize)->offset($offset)->get(TransactionJournal::QUERYFIELDS); + $paginator = new LengthAwarePaginator($set, $count, $pageSize, $page); - return $set; + return $paginator; } /** diff --git a/app/Repositories/Bill/BillRepositoryInterface.php b/app/Repositories/Bill/BillRepositoryInterface.php index 948e0c67fd..e1667fe83e 100644 --- a/app/Repositories/Bill/BillRepositoryInterface.php +++ b/app/Repositories/Bill/BillRepositoryInterface.php @@ -6,6 +6,7 @@ namespace FireflyIII\Repositories\Bill; use Carbon\Carbon; use FireflyIII\Models\Bill; use FireflyIII\Models\TransactionJournal; +use Illuminate\Pagination\LengthAwarePaginator; use Illuminate\Support\Collection; /** @@ -97,9 +98,12 @@ interface BillRepositoryInterface /** * @param Bill $bill * - * @return Collection + * @param int $page + * @param int $pageSize + * + * @return LengthAwarePaginator */ - public function getJournals(Bill $bill): Collection; + public function getJournals(Bill $bill, int $page, int $pageSize = 50): LengthAwarePaginator; /** * Get all journals that were recorded on this bill between these dates. diff --git a/resources/views/bills/show.twig b/resources/views/bills/show.twig index 30ffc95380..254a5efee6 100644 --- a/resources/views/bills/show.twig +++ b/resources/views/bills/show.twig @@ -96,7 +96,7 @@
-

{{ 'connected_journals' }}

+

{{ 'connected_journals'|_ }}

{% include 'list/journals' %} From 0ef5eeeb5510508b6ef785bf642011c67d3b24d1 Mon Sep 17 00:00:00 2001 From: James Cole Date: Thu, 21 Apr 2016 10:34:16 +0200 Subject: [PATCH 16/34] Take page size into account. [skip ci] --- .../Controllers/TransactionController.php | 6 ++--- .../Journal/JournalRepository.php | 23 ++++++++----------- .../Journal/JournalRepositoryInterface.php | 4 ++-- resources/views/accounts/show.twig | 2 +- resources/views/bills/show.twig | 2 +- resources/views/budgets/noBudget.twig | 2 +- resources/views/budgets/show.twig | 2 +- resources/views/categories/noCategory.twig | 2 +- resources/views/categories/show.twig | 2 +- .../views/categories/show_with_date.twig | 2 +- resources/views/index.twig | 2 +- resources/views/search/index.twig | 2 +- 12 files changed, 23 insertions(+), 28 deletions(-) diff --git a/app/Http/Controllers/TransactionController.php b/app/Http/Controllers/TransactionController.php index b70fd3ac54..9af4e98773 100644 --- a/app/Http/Controllers/TransactionController.php +++ b/app/Http/Controllers/TransactionController.php @@ -209,12 +209,12 @@ class TransactionController extends Controller */ public function index(JournalRepositoryInterface $repository, string $what) { + $pageSize = Preferences::get('transactionPageSize', 50)->data; $subTitleIcon = Config::get('firefly.transactionIconsByWhat.' . $what); $types = Config::get('firefly.transactionTypesByWhat.' . $what); $subTitle = trans('firefly.title_' . $what); $page = intval(Input::get('page')); - $offset = $page > 0 ? ($page - 1) * 50 : 0; - $journals = $repository->getJournalsOfTypes($types, $offset, $page); + $journals = $repository->getJournalsOfTypes($types, $page, $pageSize); $journals->setPath('transactions/' . $what); @@ -308,7 +308,7 @@ class TransactionController extends Controller Session::flash('info', $att->getMessages()->get('attachments')); } - Log::debug('Triggered TransactionJournalStored with transaction journal #' . $journal->id.' and piggy #' . intval($request->get('piggy_bank_id'))); + Log::debug('Triggered TransactionJournalStored with transaction journal #' . $journal->id . ' and piggy #' . intval($request->get('piggy_bank_id'))); event(new TransactionJournalStored($journal, intval($request->get('piggy_bank_id')))); Session::flash('success', strval(trans('firefly.stored_journal', ['description' => e($journal->description)]))); diff --git a/app/Repositories/Journal/JournalRepository.php b/app/Repositories/Journal/JournalRepository.php index aad47de6d3..5eb7bb32c4 100644 --- a/app/Repositories/Journal/JournalRepository.php +++ b/app/Repositories/Journal/JournalRepository.php @@ -123,28 +123,23 @@ class JournalRepository implements JournalRepositoryInterface /** * @param array $types - * @param int $offset * @param int $page - * - * @param int $pagesize + * @param int $pageSize * * @return LengthAwarePaginator */ - public function getJournalsOfTypes(array $types, int $offset, int $page, int $pagesize = 50): LengthAwarePaginator + public function getJournalsOfTypes(array $types, int $page, int $pageSize = 50): LengthAwarePaginator { - $set = $this->user + $offset = ($page - 1) * $pageSize; + $query = $this->user ->transactionJournals() ->expanded() - ->transactionTypes($types) - ->take($pagesize) - ->offset($offset) - ->orderBy('date', 'DESC') - ->orderBy('order', 'ASC') - ->orderBy('id', 'DESC') - ->get(TransactionJournal::QUERYFIELDS); + ->transactionTypes($types); - $count = $this->user->transactionJournals()->transactionTypes($types)->count(); - $journals = new LengthAwarePaginator($set, $count, $pagesize, $page); + + $count = $query->count(); + $set = $query->take($pageSize)->offset($offset)->get(TransactionJournal::QUERYFIELDS); + $journals = new LengthAwarePaginator($set, $count, $pageSize, $page); return $journals; } diff --git a/app/Repositories/Journal/JournalRepositoryInterface.php b/app/Repositories/Journal/JournalRepositoryInterface.php index e7bfa81bce..47a6c28ffd 100644 --- a/app/Repositories/Journal/JournalRepositoryInterface.php +++ b/app/Repositories/Journal/JournalRepositoryInterface.php @@ -57,12 +57,12 @@ interface JournalRepositoryInterface /** * @param array $types - * @param int $offset * @param int $page + * @param int $pageSize * * @return LengthAwarePaginator */ - public function getJournalsOfTypes(array $types, int $offset, int $page): LengthAwarePaginator; + public function getJournalsOfTypes(array $types, int $page, int $pageSize = 50): LengthAwarePaginator; /** * @param string $type diff --git a/resources/views/accounts/show.twig b/resources/views/accounts/show.twig index da328548ea..ab2c17cf99 100644 --- a/resources/views/accounts/show.twig +++ b/resources/views/accounts/show.twig @@ -38,7 +38,7 @@

{{ 'transactions'|_ }}

- {% include 'list/journals' with {sorting:true} %} + {% include 'list.journals' with {sorting:true} %}
diff --git a/resources/views/bills/show.twig b/resources/views/bills/show.twig index 254a5efee6..69f49b9cf7 100644 --- a/resources/views/bills/show.twig +++ b/resources/views/bills/show.twig @@ -99,7 +99,7 @@

{{ 'connected_journals'|_ }}

- {% include 'list/journals' %} + {% include 'list.journals' %}
diff --git a/resources/views/budgets/noBudget.twig b/resources/views/budgets/noBudget.twig index aa608cebc2..4452f617a8 100644 --- a/resources/views/budgets/noBudget.twig +++ b/resources/views/budgets/noBudget.twig @@ -12,7 +12,7 @@

{{ subTitle }}

- {% include 'list/journals.twig' with {'journals': list} %} + {% include 'list.journals' with {'journals': list} %}
diff --git a/resources/views/budgets/show.twig b/resources/views/budgets/show.twig index 13c1bd6bb7..227961835b 100644 --- a/resources/views/budgets/show.twig +++ b/resources/views/budgets/show.twig @@ -35,7 +35,7 @@

{{ 'transactions'|_ }}

- {% include 'list/journals.twig' %} + {% include 'list.journals' %}
diff --git a/resources/views/categories/noCategory.twig b/resources/views/categories/noCategory.twig index 4a47621664..7daef5aa6e 100644 --- a/resources/views/categories/noCategory.twig +++ b/resources/views/categories/noCategory.twig @@ -12,7 +12,7 @@ {{ subTitle }}
- {% include 'list/journals.twig' with {'journals': list} %} + {% include 'list.journals' with {'journals': list} %}
diff --git a/resources/views/categories/show.twig b/resources/views/categories/show.twig index 55787e65f1..2975c4b54b 100644 --- a/resources/views/categories/show.twig +++ b/resources/views/categories/show.twig @@ -35,7 +35,7 @@

{{ 'transactions'|_ }}

- {% include 'list/journals' %} + {% include 'list.journals' %}
diff --git a/resources/views/categories/show_with_date.twig b/resources/views/categories/show_with_date.twig index 868e6c4a4f..d8a6c1c17c 100644 --- a/resources/views/categories/show_with_date.twig +++ b/resources/views/categories/show_with_date.twig @@ -31,7 +31,7 @@

{{ 'transactions'|_ }}

- {% include 'list/journals' %} + {% include 'list.journals' %}
diff --git a/resources/views/index.twig b/resources/views/index.twig index c163eb1234..a3529b7e37 100644 --- a/resources/views/index.twig +++ b/resources/views/index.twig @@ -94,7 +94,7 @@
- {% include 'list/journals-tiny.twig' with {'transactions': data[0],'account': data[1]} %} + {% include 'list.journals-tiny' with {'transactions': data[0],'account': data[1]} %}
- {% include 'list/journals-tiny' with {'transactions' : result.transactions} %} + {% include 'list.journals-tiny' with {'transactions' : result.transactions} %}
- Matching on + {{ 'matching_on'|_ }} {% for word in bill.match|split(',') %} {{ word }} {% endfor %} - between {{ bill.amount_min|formatAmount }} and {{ bill.amount_max|formatAmount }}. - Repeats {{ bill.repeat_freq }}. + {{ trans('firefly.between_amounts', {low: bill.amount_min|formatAmount, high: bill.amount_max|formatAmount }) }} + {{ 'repeats'|_ }} + {{ trans('firefly.repeat_freq_' ~bill.repeat_freq) }}.
Next expected match{{ 'next_expected_match'|_ }} {% if bill.nextExpectedMatch %} {{ bill.nextExpectedMatch.formatLocalized(monthAndDayFormat) }} @@ -67,11 +68,11 @@
-

More

+

{{ 'more'|_ }}

@@ -82,7 +83,7 @@
-

Chart

+

{{ 'chart'|_ }}

@@ -95,7 +96,7 @@
-

Connected transaction journals

+

{{ 'connected_journals' }}

{% include 'list/journals' %} From 29fbd46e335f1ef72ef9e532f5d3870e1a74a25b Mon Sep 17 00:00:00 2001 From: James Cole Date: Wed, 20 Apr 2016 17:13:25 +0200 Subject: [PATCH 08/34] Fixes for translations. [skip ci] --- resources/lang/en_US/firefly.php | 6 ++++++ resources/views/bills/show.twig | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/resources/lang/en_US/firefly.php b/resources/lang/en_US/firefly.php index a35e74c3b0..1e8de92ccc 100644 --- a/resources/lang/en_US/firefly.php +++ b/resources/lang/en_US/firefly.php @@ -71,6 +71,12 @@ return [ 'search' => 'Search', 'no_budget_pointer' => 'You seem to have no budgets yet. You should create some on the budgets-page. Budgets can help you keep track of expenses.', + // repeat frequencies: + 'repeat_freq_monthly' => 'monthly', + 'weekly' => 'weekly', + 'quarterly' => 'quarterly', + 'half-year' => 'every half year', + 'yearly' => 'yearly', // account confirmation: 'confirm_account_header' => 'Please confirm your account', 'confirm_account_intro' => 'An email has been sent to the address you used during your registration. Please check it out for further instructions. If you did not get this message, you can have Firefly send it again.', diff --git a/resources/views/bills/show.twig b/resources/views/bills/show.twig index af0b2d7c29..30ffc95380 100644 --- a/resources/views/bills/show.twig +++ b/resources/views/bills/show.twig @@ -45,7 +45,7 @@ {% for word in bill.match|split(',') %} {{ word }} {% endfor %} - {{ trans('firefly.between_amounts', {low: bill.amount_min|formatAmount, high: bill.amount_max|formatAmount }) }} + {{ trans('firefly.between_amounts', {low: bill.amount_min|formatAmount, high: bill.amount_max|formatAmount })|raw }} {{ 'repeats'|_ }} {{ trans('firefly.repeat_freq_' ~bill.repeat_freq) }}.
- + + @@ -100,5 +101,23 @@ {% endfor %}
{{ trans('list.description') }} {{ trans('list.amount') }}
+ +
+
+ {{ journals.render|raw }} +
+
\ No newline at end of file diff --git a/resources/views/transactions/index.twig b/resources/views/transactions/index.twig index d3a9d7741f..13b3b3a4a3 100644 --- a/resources/views/transactions/index.twig +++ b/resources/views/transactions/index.twig @@ -11,7 +11,7 @@

{{ subTitle }}

-
+
{% include 'list.journals' %}
From f43938726a697454e1ee2ccb65ff0dff23e9e611 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 23 Apr 2016 06:11:31 +0200 Subject: [PATCH 19/34] Simple mass edit JS complete. Fallback for when the list.js is not included. #241 --- public/js/ff/transactions/list.js | 136 +++++++++++++++++++++++- resources/lang/en_US/firefly.php | 6 +- resources/views/list/journals.twig | 26 +++-- resources/views/transactions/index.twig | 3 + 4 files changed, 158 insertions(+), 13 deletions(-) diff --git a/public/js/ff/transactions/list.js b/public/js/ff/transactions/list.js index aee76d1507..c364f19e20 100644 --- a/public/js/ff/transactions/list.js +++ b/public/js/ff/transactions/list.js @@ -1,7 +1,137 @@ -/* globals $ */ +/* globals $, edit_selected_txt, delete_selected_txt */ + $(document).ready(function () { "use strict"; - + $('.mass_edit_all').show(); $('.mass_select').click(startMassSelect); $('.mass_stop_select').click(stopMassSelect); -}); \ No newline at end of file + + // top button to select all / deselect all: + $('input[name="select_all"]').change(function () { + if (this.checked) { + checkAll(); + countChecked(); + } else { + uncheckAll(); + countChecked(); + } + }); + $('.select_all_single').change(function () { + countChecked(); + }); + + // click the edit button: + $('.mass_edit').click(goToMassEdit); + // click the delete button: + $('.mass_delete').click(goToMassDelete); +}); + +function goToMassEdit() { + "use strict"; + var checkedArray = getCheckboxes(); + console.log('Journals: ' + checkedArray); + + // go to specially crafted URL: + window.location.href = 'transactions/mass-edit/' + checkedArray; + return false; +} + +function goToMassDelete() { + "use strict"; + var checkedArray = getCheckboxes(); + console.log('Journals: ' + checkedArray); + + // go to specially crafted URL: + window.location.href = 'transactions/mass-delete/' + checkedArray; + return false; +} + +function getCheckboxes() { + "use strict"; + var list = []; + $.each($('.select_all_single'), function (i, v) { + var checkbox = $(v); + if (checkbox.prop('checked')) { + // add to list. + list.push(checkbox.val()); + } + }); + return list; +} + + +function countChecked() { + "use strict"; + var checked = $('.select_all_single:checked').length; + console.log("Now " + checked + " selected."); + if (checked > 0) { + $('.mass_edit span').text(edit_selected_txt + ' (' + checked + ')') + $('.mass_delete span').text(delete_selected_txt + ' (' + checked + ')') + $('.mass_button_options').show(); + + } else { + $('.mass_button_options').hide(); + } +} + + +function checkAll() { + "use strict"; + $('.select_all_single').prop('checked', true); +} +function uncheckAll() { + "use strict"; + $('.select_all_single').prop('checked', false); +} + +function stopMassSelect() { + "use strict"; + + // uncheck all: + uncheckAll(); + countChecked(); + + // hide "select all" box in table header. + $('.select_boxes').hide(); + + // show the other header cell. + $('.no_select_boxes').show(); + + // show edit/delete buttons + $('.edit_buttons').show(); + + // hide the checkbox. + $('.select_single').hide(); + + // show the start button + $('.mass_select').show(); + + // hide the stop button + $('.mass_stop_select').hide(); + + return false; +} + +function startMassSelect() { + "use strict"; + + // show "select all" box in table header. + $('.select_boxes').show(); + + // hide the other header cell. + $('.no_select_boxes').hide(); + + // hide edit/delete buttons + $('.edit_buttons').hide(); + + // show the checkbox. + $('.select_single').show(); + + // hide the start button + $('.mass_select').hide(); + + // show the stop button + $('.mass_stop_select').show(); + + return false; +} \ No newline at end of file diff --git a/resources/lang/en_US/firefly.php b/resources/lang/en_US/firefly.php index 1e8de92ccc..6e1182b758 100644 --- a/resources/lang/en_US/firefly.php +++ b/resources/lang/en_US/firefly.php @@ -318,6 +318,7 @@ return [ 'title_transfer' => 'Transfers', 'title_transfers' => 'Transfers', + // csv import: 'csv_import' => 'Import CSV file', 'csv' => 'CSV', @@ -555,7 +556,10 @@ return [ 'deleted_deposit' => 'Successfully deleted deposit ":description"', 'deleted_transfer' => 'Successfully deleted transfer ":description"', 'stored_journal' => 'Successfully created new transaction ":description"', - + 'select_transactions' => 'Select transactions', + 'stop_selection' => 'Stop selecting transactions', + 'edit_selected' => 'Edit selected', + 'delete_selected' => 'Delete selected', // new user: 'welcome' => 'Welcome to Firefly!', 'createNewAsset' => 'Create a new asset account to get started. ' . diff --git a/resources/views/list/journals.twig b/resources/views/list/journals.twig index f51b5e5b34..a6b96110d1 100644 --- a/resources/views/list/journals.twig +++ b/resources/views/list/journals.twig @@ -3,8 +3,8 @@ - - + @@ -30,7 +30,10 @@ {% for journal in journals %}
{{ trans('list.description') }} {{ trans('list.amount') }}
- \ No newline at end of file +
+ \ No newline at end of file diff --git a/resources/views/transactions/index.twig b/resources/views/transactions/index.twig index 13b3b3a4a3..87c415374d 100644 --- a/resources/views/transactions/index.twig +++ b/resources/views/transactions/index.twig @@ -18,3 +18,6 @@
{% endblock %} +{% block scripts %} + +{% endblock %} \ No newline at end of file From 3948cb8e6c310802b918ae12ef6a0b7d1df70724 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 23 Apr 2016 09:33:54 +0200 Subject: [PATCH 20/34] New mass delete form and options. #241 --- .../Controllers/TransactionController.php | 72 +++++++++++++++++ app/Http/Requests/MassJournalRequest.php | 49 ++++++++++++ app/Http/routes.php | 6 ++ .../Journal/JournalRepository.php | 17 +++- .../Journal/JournalRepositoryInterface.php | 7 ++ app/Support/Binder/CategoryList.php | 2 +- app/Support/Binder/JournalList.php | 48 ++++++++++++ app/Validation/FireflyValidator.php | 2 +- config/firefly.php | 1 + public/js/ff/transactions/list.js | 5 +- resources/lang/en_US/firefly.php | 4 + resources/lang/en_US/form.php | 3 + resources/views/transactions/mass-delete.twig | 78 +++++++++++++++++++ 13 files changed, 288 insertions(+), 6 deletions(-) create mode 100644 app/Http/Requests/MassJournalRequest.php create mode 100644 app/Support/Binder/JournalList.php create mode 100644 resources/views/transactions/mass-delete.twig diff --git a/app/Http/Controllers/TransactionController.php b/app/Http/Controllers/TransactionController.php index 9af4e98773..436bec9ecb 100644 --- a/app/Http/Controllers/TransactionController.php +++ b/app/Http/Controllers/TransactionController.php @@ -7,8 +7,10 @@ use Config; use ExpandedForm; use FireflyIII\Events\TransactionJournalStored; use FireflyIII\Events\TransactionJournalUpdated; +use FireflyIII\Exceptions\FireflyException; use FireflyIII\Helpers\Attachments\AttachmentHelperInterface; use FireflyIII\Http\Requests\JournalFormRequest; +use FireflyIII\Http\Requests\MassJournalRequest; use FireflyIII\Models\PiggyBank; use FireflyIII\Models\PiggyBankEvent; use FireflyIII\Models\Transaction; @@ -222,6 +224,76 @@ class TransactionController extends Controller } + /** + * @param Collection $journals + * + * @return View + */ + public function massDelete(Collection $journals) + { + $subTitle = trans('firefly.mass_delete_journals'); + + // put previous url in session + Session::put('transactions.mass-delete.url', URL::previous()); + Session::flash('gaEventCategory', 'transactions'); + Session::flash('gaEventAction', 'mass-delete'); + + return view('transactions.mass-delete', compact('journals', 'subTitle')); + + } + + /** + * @param MassJournalRequest $request + * @param JournalRepositoryInterface $repository + * + * @return mixed + */ + public function massDestroy(MassJournalRequest $request, JournalRepositoryInterface $repository) + { + $ids = $request->get('confirm_mass_delete'); + $set = new Collection; + if (is_array($ids)) { + /** @var int $journalId */ + foreach ($ids as $journalId) { + /** @var TransactionJournal $journal */ + $journal = $repository->find($journalId); + if (!is_null($journal->id) && $journalId == $journal->id) { + $set->push($journal); + } + } + } + unset($journal); + /** @var TransactionJournal $journal */ + foreach ($set as $journal) { + $repository->delete($journal); + } + + Preferences::mark(); + + Session::flash('success', trans('firefly.mass_deleted_transactions_success')); + + // redirect to previous URL: + return redirect(session('transactions.mass-delete.url')); + + } + + /** + * @param Collection $journals + */ + public function massEdit(Collection $journals) + { + throw new FireflyException('Mass editing of journals is not yet supported.'); + + } + + /** + * + */ + public function massUpdate() + { + + } + /** * @param JournalRepositoryInterface $repository * diff --git a/app/Http/Requests/MassJournalRequest.php b/app/Http/Requests/MassJournalRequest.php new file mode 100644 index 0000000000..63c9a4caf9 --- /dev/null +++ b/app/Http/Requests/MassJournalRequest.php @@ -0,0 +1,49 @@ + 'required|belongsToUser:transaction_journals,id', + ]; + } +} diff --git a/app/Http/routes.php b/app/Http/routes.php index 394eec0429..159f1647e7 100644 --- a/app/Http/routes.php +++ b/app/Http/routes.php @@ -377,6 +377,12 @@ Route::group( Route::post('/transaction/destroy/{tj}', ['uses' => 'TransactionController@destroy', 'as' => 'transactions.destroy']); Route::post('/transaction/reorder', ['uses' => 'TransactionController@reorder', 'as' => 'transactions.reorder']); + // mass edit and mass delete. + Route::get('/transactions/mass-edit/{journalList}', ['uses' => 'TransactionController@massEdit', 'as' => 'transactions.mass-edit']); + Route::get('/transactions/mass-delete/{journalList}', ['uses' => 'TransactionController@massDelete', 'as' => 'transactions.mass-delete']); + Route::post('/transactions/mass-update/{journalList}', ['uses' => 'TransactionController@massUpdate', 'as' => 'transactions.mass-update']); + Route::post('/transactions/mass-destroy', ['uses' => 'TransactionController@massDestroy', 'as' => 'transactions.mass-destroy']); + /** * POPUP Controllers */ diff --git a/app/Repositories/Journal/JournalRepository.php b/app/Repositories/Journal/JournalRepository.php index 5eb7bb32c4..2775226b1f 100644 --- a/app/Repositories/Journal/JournalRepository.php +++ b/app/Repositories/Journal/JournalRepository.php @@ -51,6 +51,21 @@ class JournalRepository implements JournalRepositoryInterface return true; } + /** + * @param int $journalId + * + * @return TransactionJournal + */ + public function find(int $journalId) : TransactionJournal + { + $journal = $this->user->transactionjournals()->where('id', $journalId)->first(); + if (is_null($journal)) { + return new TransactionJournal; + } + + return $journal; + } + /** * Get users first transaction journal * @@ -131,7 +146,7 @@ class JournalRepository implements JournalRepositoryInterface public function getJournalsOfTypes(array $types, int $page, int $pageSize = 50): LengthAwarePaginator { $offset = ($page - 1) * $pageSize; - $query = $this->user + $query = $this->user ->transactionJournals() ->expanded() ->transactionTypes($types); diff --git a/app/Repositories/Journal/JournalRepositoryInterface.php b/app/Repositories/Journal/JournalRepositoryInterface.php index 47a6c28ffd..e70c40a0f7 100644 --- a/app/Repositories/Journal/JournalRepositoryInterface.php +++ b/app/Repositories/Journal/JournalRepositoryInterface.php @@ -24,6 +24,13 @@ interface JournalRepositoryInterface */ public function delete(TransactionJournal $journal): bool; + /** + * @param int $journalId + * + * @return TransactionJournal + */ + public function find(int $journalId) : TransactionJournal; + /** * Get users first transaction journal * diff --git a/app/Support/Binder/CategoryList.php b/app/Support/Binder/CategoryList.php index 9d5dd6d459..a33309a852 100644 --- a/app/Support/Binder/CategoryList.php +++ b/app/Support/Binder/CategoryList.php @@ -38,7 +38,7 @@ class CategoryList implements BinderInterface ->where('user_id', Auth::user()->id) ->get(); - // add empty budget if applicable. + // add empty category if applicable. if (in_array('0', $ids)) { $object->push(new Category); } diff --git a/app/Support/Binder/JournalList.php b/app/Support/Binder/JournalList.php new file mode 100644 index 0000000000..f673175db4 --- /dev/null +++ b/app/Support/Binder/JournalList.php @@ -0,0 +1,48 @@ +expanded() + ->where('transaction_journals.user_id', Auth::user()->id) + ->get(TransactionJournal::QUERYFIELDS); + + if ($object->count() > 0) { + return $object; + } + } + throw new NotFoundHttpException; + } +} diff --git a/app/Validation/FireflyValidator.php b/app/Validation/FireflyValidator.php index db638513f3..c11872f66f 100644 --- a/app/Validation/FireflyValidator.php +++ b/app/Validation/FireflyValidator.php @@ -80,7 +80,7 @@ class FireflyValidator extends Validator $count = DB::table($parameters[0])->where('user_id', Auth::user()->id)->where($field, $value)->count(); - if ($count == 1) { + if ($count === 1) { return true; } diff --git a/config/firefly.php b/config/firefly.php index ec3bb71294..7197e1f7ee 100644 --- a/config/firefly.php +++ b/config/firefly.php @@ -173,6 +173,7 @@ return [ // lists 'accountList' => 'FireflyIII\Support\Binder\AccountList', 'budgetList' => 'FireflyIII\Support\Binder\BudgetList', + 'journalList' => 'FireflyIII\Support\Binder\JournalList', 'categoryList' => 'FireflyIII\Support\Binder\CategoryList', // others diff --git a/public/js/ff/transactions/list.js b/public/js/ff/transactions/list.js index c364f19e20..22b4089ddf 100644 --- a/public/js/ff/transactions/list.js +++ b/public/js/ff/transactions/list.js @@ -29,7 +29,6 @@ $(document).ready(function () { function goToMassEdit() { "use strict"; var checkedArray = getCheckboxes(); - console.log('Journals: ' + checkedArray); // go to specially crafted URL: window.location.href = 'transactions/mass-edit/' + checkedArray; @@ -39,7 +38,6 @@ function goToMassEdit() { function goToMassDelete() { "use strict"; var checkedArray = getCheckboxes(); - console.log('Journals: ' + checkedArray); // go to specially crafted URL: window.location.href = 'transactions/mass-delete/' + checkedArray; @@ -63,7 +61,6 @@ function getCheckboxes() { function countChecked() { "use strict"; var checked = $('.select_all_single:checked').length; - console.log("Now " + checked + " selected."); if (checked > 0) { $('.mass_edit span').text(edit_selected_txt + ' (' + checked + ')') $('.mass_delete span').text(delete_selected_txt + ' (' + checked + ')') @@ -88,9 +85,11 @@ function stopMassSelect() { "use strict"; // uncheck all: + $('input[name="select_all"]').prop('checked', false); uncheckAll(); countChecked(); + // hide "select all" box in table header. $('.select_boxes').hide(); diff --git a/resources/lang/en_US/firefly.php b/resources/lang/en_US/firefly.php index 6e1182b758..61c2fd4973 100644 --- a/resources/lang/en_US/firefly.php +++ b/resources/lang/en_US/firefly.php @@ -560,6 +560,10 @@ return [ 'stop_selection' => 'Stop selecting transactions', 'edit_selected' => 'Edit selected', 'delete_selected' => 'Delete selected', + 'mass_delete_journals' => 'Delete a number of transactions', + 'perm-delete-many' => 'Deleting many items in one go can be very disruptive. Please be catious.', + + // new user: 'welcome' => 'Welcome to Firefly!', 'createNewAsset' => 'Create a new asset account to get started. ' . diff --git a/resources/lang/en_US/form.php b/resources/lang/en_US/form.php index 0d7735421e..5d3a2333e0 100644 --- a/resources/lang/en_US/form.php +++ b/resources/lang/en_US/form.php @@ -112,8 +112,11 @@ return [ 'currency_areYouSure' => 'Are you sure you want to delete the currency named ":name"?', 'piggyBank_areYouSure' => 'Are you sure you want to delete the piggy bank named ":name"?', 'journal_areYouSure' => 'Are you sure you want to delete the transaction described ":description"?', + 'mass_journal_are_you_sure' => 'Are you sure you want to delete these transactions?', 'tag_areYouSure' => 'Are you sure you want to delete the tag ":tag"?', 'permDeleteWarning' => 'Deleting stuff from Firely is permanent and cannot be undone.', + 'mass_make_selection' => 'You can still prevent items from being deleted by removing the checkbox.', + 'delete_all_permanently' => 'Delete all permanently', 'also_delete_transactions' => 'The only transaction connected to this account will be deleted as well.|All :count transactions connected to this account will be deleted as well.', 'also_delete_rules' => 'The only rule connected to this rule group will be deleted as well.|All :count rules connected to this rule group will be deleted as well.', 'also_delete_piggyBanks' => 'The only piggy bank connected to this account will be deleted as well.|All :count piggy bank connected to this account will be deleted as well.', diff --git a/resources/views/transactions/mass-delete.twig b/resources/views/transactions/mass-delete.twig new file mode 100644 index 0000000000..c39b4eee43 --- /dev/null +++ b/resources/views/transactions/mass-delete.twig @@ -0,0 +1,78 @@ +{% extends "./layout/default.twig" %} + +{% block breadcrumbs %} + {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, journal) }} +{% endblock %} + +{% block content %} + {{ Form.open({'class' : 'form-horizontal','id' : 'destroy','url' : route('transactions.mass-destroy')}) }} + +
+
+
+
+

{{ 'mass_delete_journals'|_ }}

+
+
+

+ {{ trans('form.permDeleteWarning') }} + {{ 'perm-delete-many'|_ }} +

+ +

+ {{ trans('form.mass_journal_are_you_sure') }} + {{ trans('form.mass_make_selection') }} +

+ + + + + + + + + + + {% for journal in journals %} + + + + + + + + + {% endfor %} +
 {{ trans('list.description') }}{{ trans('list.amount') }}
+ + + {{ journal.description }} + + {{ journal|formatJournal }} + + {{ journal.date.formatLocalized(monthAndDayFormat) }} + + {% if journal.source_account_type == 'Cash account' %} + (cash) + {% else %} + {{ journal.source_account_name }} + {% endif %} + + {% if journal.destination_account_type == 'Cash account' %} + (cash) + {% else %} + {{ journal.destination_account_name }} + {% endif %} +
+ +
+ +
+
+
+ + {{ Form.close|raw }} +{% endblock %} From 5cf0131d755614096b786d09c1de04554b6ef315 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 23 Apr 2016 12:14:24 +0200 Subject: [PATCH 21/34] New translations. --- resources/lang/en_US/firefly.php | 4 +- resources/lang/en_US/form.php | 2 +- resources/lang/fr_FR/config.php | 1 + resources/lang/fr_FR/firefly.php | 121 ++++- resources/lang/fr_FR/form.php | 4 +- resources/lang/fr_FR/help.php | 32 +- resources/lang/fr_FR/list.php | 74 +-- resources/lang/nl_NL/config.php | 1 + resources/lang/nl_NL/firefly.php | 35 +- resources/lang/nl_NL/form.php | 3 + resources/lang/nl_NL/validation.php | 0 resources/lang/pt_BR/config.php | 3 +- resources/lang/pt_BR/firefly.php | 725 ++++++++++++++++------------ resources/lang/pt_BR/form.php | 119 ++--- resources/lang/pt_BR/help.php | 9 +- resources/lang/pt_BR/list.php | 74 +-- resources/lang/pt_BR/passwords.php | 12 +- resources/lang/pt_BR/validation.php | 6 +- 18 files changed, 761 insertions(+), 464 deletions(-) mode change 100755 => 100644 resources/lang/nl_NL/validation.php diff --git a/resources/lang/en_US/firefly.php b/resources/lang/en_US/firefly.php index 61c2fd4973..eb0e5408cd 100644 --- a/resources/lang/en_US/firefly.php +++ b/resources/lang/en_US/firefly.php @@ -472,7 +472,7 @@ return [ 'matching_on' => 'Matching on', 'between_amounts' => 'between :low and :high.', 'repeats' => 'Repeats', - 'connected_journals' => 'Connected transaction journals', + 'connected_journals' => 'Connected transactions', 'auto_match_on' => 'Automatically matched by Firefly', 'auto_match_off' => 'Not automatically matched by Firefly', 'next_expected_match' => 'Next expected match', @@ -561,7 +561,7 @@ return [ 'edit_selected' => 'Edit selected', 'delete_selected' => 'Delete selected', 'mass_delete_journals' => 'Delete a number of transactions', - 'perm-delete-many' => 'Deleting many items in one go can be very disruptive. Please be catious.', + 'perm-delete-many' => 'Deleting many items in one go can be very disruptive. Please be cautious.', // new user: diff --git a/resources/lang/en_US/form.php b/resources/lang/en_US/form.php index 5d3a2333e0..e440a3d5b5 100644 --- a/resources/lang/en_US/form.php +++ b/resources/lang/en_US/form.php @@ -116,7 +116,7 @@ return [ 'tag_areYouSure' => 'Are you sure you want to delete the tag ":tag"?', 'permDeleteWarning' => 'Deleting stuff from Firely is permanent and cannot be undone.', 'mass_make_selection' => 'You can still prevent items from being deleted by removing the checkbox.', - 'delete_all_permanently' => 'Delete all permanently', + 'delete_all_permanently' => 'Delete selected permanently', 'also_delete_transactions' => 'The only transaction connected to this account will be deleted as well.|All :count transactions connected to this account will be deleted as well.', 'also_delete_rules' => 'The only rule connected to this rule group will be deleted as well.|All :count rules connected to this rule group will be deleted as well.', 'also_delete_piggyBanks' => 'The only piggy bank connected to this account will be deleted as well.|All :count piggy bank connected to this account will be deleted as well.', diff --git a/resources/lang/fr_FR/config.php b/resources/lang/fr_FR/config.php index 783baf9ac6..f7faeec18e 100644 --- a/resources/lang/fr_FR/config.php +++ b/resources/lang/fr_FR/config.php @@ -17,4 +17,5 @@ return [ 'quarter_of_year' => '%B %Y', 'year' => '%Y', 'half_year' => '%B %Y', + ]; diff --git a/resources/lang/fr_FR/firefly.php b/resources/lang/fr_FR/firefly.php index 1c0238f5b7..c71c4138c8 100644 --- a/resources/lang/fr_FR/firefly.php +++ b/resources/lang/fr_FR/firefly.php @@ -31,6 +31,8 @@ return [ 'bounced_error' => 'Le message envoyé à :email a été rejeté, donc pas d\'accès pour vous.', 'deleted_error' => 'These credentials do not match our records.', 'general_blocked_error' => 'Your account has been disabled, so you cannot login.', + 'expired_error' => 'Your account has expired, and can no longer be used.', + 'unbalanced_error' => 'Your transactions are unbalanced. This means a withdrawal, deposit or transfer was not stored properly. Please check your accounts and transactions for errors (unbalanced amount :amount).', 'removed_amount' => 'Supprimé :amount', 'added_amount' => 'Ajouté :amount', 'asset_account_role_help' => 'Any extra options resulting from your choice can be set later.', @@ -52,6 +54,41 @@ return [ 'flash_info_multiple' => 'There is one message|There are :count messages', 'flash_error_multiple' => 'There is one error|There are :count errors', 'net_worth' => 'Net worth', + 'route_has_no_help' => 'There is no help for this route, or there is no help available in your language.', + 'two_factor_welcome' => 'Hello, :user!', + 'two_factor_enter_code' => 'To continue, please enter your two factor authentication code. Your application can generate it for you.', + 'two_factor_code_here' => 'Enter code here', + 'two_factor_title' => 'Two factor authentication', + 'authenticate' => 'Authenticate', + 'two_factor_forgot_title' => 'Lost two factor authentication', + 'two_factor_forgot' => 'I forgot my two-factor thing.', + 'two_factor_lost_header' => 'Lost your two factor authentication?', + 'two_factor_lost_intro' => 'Unfortunately, this is not something you can reset from the web interface. You have two choices.', + 'two_factor_lost_fix_self' => 'If you run your own instance of Firefly III, check the logs in storage/logs for instructions.', + 'two_factor_lost_fix_owner' => 'Otherwise, email the site owner, :site_owner and ask them to reset your two factor authentication.', + 'warning_much_data' => ':days days of data may take a while to load.', + 'registered' => 'You have registered successfully!', + 'search' => 'Search', + 'no_budget_pointer' => 'You seem to have no budgets yet. You should create some on the budgets-page. Budgets can help you keep track of expenses.', + + // repeat frequencies: + 'repeat_freq_monthly' => 'monthly', + 'weekly' => 'Weekly', + 'quarterly' => 'Quarterly', + 'half-year' => 'Every six months', + 'yearly' => 'Yearly', + // account confirmation: + 'confirm_account_header' => 'Please confirm your account', + 'confirm_account_intro' => 'An email has been sent to the address you used during your registration. Please check it out for further instructions. If you did not get this message, you can have Firefly send it again.', + 'confirm_account_resend_email' => 'Send me the confirmation message I need to activate my account.', + 'account_is_confirmed' => 'Your account has been confirmed!', + 'invalid_activation_code' => 'It seems the code you are using is not valid, or has expired.', + 'confirm_account_is_resent_header' => 'The confirmation has been resent', + 'confirm_account_is_resent_text' => 'The confirmation message has been resent. If you still did not receive the confirmation message, please contact the site owner at :owner or check the log files to see what went wrong.', + 'confirm_account_is_resent_go_home' => 'Go to the index page of Firefly', + 'confirm_account_not_resent_header' => 'Something went wrong :(', + 'confirm_account_not_resent_intro' => 'The confirmation message has been not resent. If you still did not receive the confirmation message, please contact the site owner at :owner instead. Possibly, you have tried to resend the activation message too often. You can have Firefly III try to resend the confirmation message every hour.', + 'confirm_account_not_resent_go_home' => 'Go to the index page of Firefly', // export data: 'import_and_export' => 'Import and export', @@ -237,6 +274,7 @@ return [ 'pref_two_factor_auth_remove_code' => 'Remove verification code', 'pref_two_factor_auth_remove_will_disable' => '(this will also disable two-factor authentication)', 'pref_save_settings' => 'Save settings', + 'saved_preferences' => 'Preferences saved!', // profile: 'change_your_password' => 'Change your password', @@ -255,6 +293,7 @@ return [ 'should_change' => 'The idea is to change your password.', 'invalid_password' => 'Invalid password!', + // attachments 'nr_of_attachments' => 'One attachment|:count attachments', 'attachments' => 'Attachments', @@ -262,6 +301,7 @@ return [ 'update_attachment' => 'Update attachment', 'delete_attachment' => 'Delete attachment ":name"', 'attachment_deleted' => 'Deleted attachment ":name"', + 'attachment_updated' => 'Updated attachment ":name"', 'upload_max_file_size' => 'Maximum file size: :size', // tour: @@ -278,6 +318,7 @@ return [ 'title_transfer' => 'Transferts', 'title_transfers' => 'Transferts', + // csv import: 'csv_import' => 'Import CSV file', 'csv' => 'CSV', @@ -363,6 +404,11 @@ return [ 'csv_import_account_help' => 'If your CSV file does NOT contain information about your asset account(s), use this dropdown to select to which account the transactions in the CSV belong to.', 'csv_delimiter_help' => 'Choose the field delimiter that is used in your input file. If not sure, comma is the safest option.', 'csv_date_parse_error' => 'Could not parse a valid date from ":value", using the format ":format". Are you sure your CSV is correct?', + 'could_not_recover' => 'Could not continue from the previous step. Your progress has been lost :(. The log files will tell you what happened.', + 'must_select_roles' => 'You must select some roles for your file content, or the process cannot continue.', + 'invalid_mapping' => 'You have submitted an invalid mapping. The process cannot continue.', + 'no_file_uploaded' => 'It seems you did not upload a file.', + // create new stuff: 'create_new_withdrawal' => 'Creer un nouveau retrait', @@ -395,6 +441,8 @@ return [ 'to_get_started' => 'To get started with Firefly, please enter your current bank\'s name, and the balance of your checking account:', 'savings_balance_text' => 'If you have a savings account, please enter the current balance of your savings account:', 'cc_balance_text' => 'If you have a credit card, please enter your credit card\'s limit.', + 'stored_new_account_new_user' => 'Yay! Your new account has been stored.', + 'stored_new_accounts_new_user' => 'Yay! Your new accounts have been stored.', // forms: 'mandatoryFields' => 'Mandatory fields', @@ -404,7 +452,8 @@ return [ // budgets: 'create_new_budget' => 'Create a new budget', - 'store_new_budget' => ' Store new budget', + 'store_new_budget' => 'Store new budget', + 'stored_new_budget' => 'Stored new budget ":name"', 'availableIn' => 'Available in :date', 'transactionsWithoutBudget' => 'Expenses without budget', 'transactionsWithoutBudgetDate' => 'Expenses without budget in :date', @@ -413,15 +462,32 @@ return [ 'without_budget_between' => 'Transactions without a budget between :start and :end', 'budget_in_month' => ':name in :month', 'delete_budget' => 'Delete budget ":name"', + 'deleted_budget' => 'Deleted budget ":name"', 'edit_budget' => 'Edit budget ":name"', + 'updated_budget' => 'Updated budget ":name"', 'update_amount' => 'Update amount', 'update_budget' => 'Update budget', // bills: + 'matching_on' => 'Matching on', + 'between_amounts' => 'between :low and :high.', + 'repeats' => 'Repeats', + 'connected_journals' => 'Connected transactions', + 'auto_match_on' => 'Automatically matched by Firefly', + 'auto_match_off' => 'Not automatically matched by Firefly', + 'next_expected_match' => 'Next expected match', 'delete_bill' => 'Delete bill ":name"', + 'deleted_bill' => 'Deleted bill ":name"', 'edit_bill' => 'Edit bill ":name"', + 'more' => 'More', + 'rescan_old' => 'Rescan old transactions', 'update_bill' => 'Update bill', + 'updated_bill' => 'Updated bill ":name"', 'store_new_bill' => 'Store new bill', + 'stored_new_bill' => 'Stored new bill ":name"', + 'cannot_scan_inactive_bill' => 'Inactive bills cannot be scanned.', + 'rescanned_bill' => 'Rescanned everything.', + 'bill_date_little_relevance' => 'The only part of this date used by Firefly is the day. It is only useful when your bill arrives at exactly the same date every month. If the payment date of your bills varies, simply use the first of the month.', // accounts: 'details_for_asset' => 'Details for asset account ":name"', @@ -449,32 +515,54 @@ return [ 'asset_accounts' => 'Asset accounts', 'expense_accounts' => 'Expense accounts', 'revenue_accounts' => 'Revenue accounts', + 'cash_accounts' => 'Cash accounts', + 'Cash account' => 'Cash account', 'accountExtraHelp_asset' => '', 'accountExtraHelp_expense' => '', 'accountExtraHelp_revenue' => '', 'account_type' => 'Account type', 'save_transactions_by_moving' => 'Save these transaction(s) by moving them to another account:', + 'stored_new_account' => 'New account ":name" stored!', + 'updated_account' => 'Updated account ":name"', + 'credit_card_options' => 'Credit card options', // categories: 'new_category' => 'New category', 'create_new_category' => 'Create a new category', 'without_category' => 'Without a category', - 'update_category' => 'Wijzig categorie', + 'update_category' => 'Update category', + 'updated_category' => 'Updated category ":name"', 'categories' => 'Categories', 'edit_category' => 'Edit category ":name"', 'no_category' => '(no category)', 'category' => 'Category', 'delete_category' => 'Delete category ":name"', + 'deleted_category' => 'Deleted category ":name"', 'store_category' => 'Store new category', + 'stored_category' => 'Stored new category ":name"', 'without_category_between' => 'Without category between :start and :end', // transactions: 'update_withdrawal' => 'Update withdrawal', 'update_deposit' => 'Update deposit', 'update_transfer' => 'Update transfer', + 'updated_withdrawal' => 'Updated withdrawal ":description"', + 'updated_deposit' => 'Updated deposit ":description"', + 'updated_transfer' => 'Updated transfer ":description"', 'delete_withdrawal' => 'Delete withdrawal ":description"', 'delete_deposit' => 'Delete deposit ":description"', 'delete_transfer' => 'Delete transfer ":description"', + 'deleted_withdrawal' => 'Successfully deleted withdrawal ":description"', + 'deleted_deposit' => 'Successfully deleted deposit ":description"', + 'deleted_transfer' => 'Successfully deleted transfer ":description"', + 'stored_journal' => 'Successfully created new transaction ":description"', + 'select_transactions' => 'Select transactions', + 'stop_selection' => 'Stop selecting transactions', + 'edit_selected' => 'Edit selected', + 'delete_selected' => 'Delete selected', + 'mass_delete_journals' => 'Delete a number of transactions', + 'perm-delete-many' => 'Deleting many items in one go can be very disruptive. Please be cautious.', + // new user: 'welcome' => 'Welcome to Firefly!', @@ -578,6 +666,7 @@ return [ 'noCategory' => '(no category)', 'notCharged' => 'Not charged (yet)', 'inactive' => 'Inactive', + 'active' => 'Active', 'difference' => 'Difference', 'in' => 'In', 'out' => 'Out', @@ -593,14 +682,24 @@ return [ 'report_type' => 'Report type', 'report_type_default' => 'Default financial report', 'report_type_audit' => 'Transaction history overview (audit)', + 'report_type_meta-history' => 'Categories, budgets and bills overview', + 'more_info_help' => 'More information about these types of reports can be found in the help pages. Press the (?) icon in the top right corner.', 'report_included_accounts' => 'Included accounts', 'report_date_range' => 'Date range', 'report_include_help' => 'In all cases, transfers to shared accounts count as expenses, and transfers from shared accounts count as income.', 'report_preset_ranges' => 'Pre-set ranges', 'shared' => 'Shared', 'fiscal_year' => 'Fiscal year', + 'income_entry' => 'Income from account ":name" between :start and :end', + 'expense_entry' => 'Expenses to account ":name" between :start and :end', + 'category_entry' => 'Expenses in category ":name" between :start and :end', + 'budget_spent_amount' => 'Expenses in budget ":budget" between :start and :end', + 'balance_amount' => 'Expenses in budget ":budget" paid from account ":account" between :start and :end', + 'no_audit_activity' => 'No activity was recorded on account :account_name between :start and :end.', + 'audit_end_balance' => 'Account balance of :account_name at the end of :end was: :balance', // charts: + 'chart' => 'Chart', 'dayOfMonth' => 'Day of the month', 'month' => 'Month', 'budget' => 'Budget', @@ -608,7 +707,7 @@ return [ 'earned' => 'Earned', 'overspent' => 'Overspent', 'left' => 'Left', - 'noBudget' => '(no budget)', + 'no_budget' => '(no budget)', 'maxAmount' => 'Maximum amount', 'minAmount' => 'Minumum amount', 'billEntry' => 'Current bill entry', @@ -629,6 +728,7 @@ return [ 'piggy_bank' => 'Piggy bank', 'new_piggy_bank' => 'Create new piggy bank', 'store_piggy_bank' => 'Store new piggy bank', + 'stored_piggy_bank' => 'Store new piggy bank ":name"', 'account_status' => 'Account status', 'left_for_piggy_banks' => 'Left for piggy banks', 'sum_of_piggy_banks' => 'Sum of piggy banks', @@ -642,6 +742,7 @@ return [ 'max_amount_remove' => 'The maximum amount you can remove is', 'update_piggy_button' => 'Update piggy bank', 'update_piggy_title' => 'Update piggy bank ":name"', + 'updated_piggy_bank' => 'Updated piggy bank ":name"', 'details' => 'Details', 'events' => 'Events', 'target_amount' => 'Target amount', @@ -654,14 +755,22 @@ return [ 'add_any_amount_to_piggy' => 'Add money to this piggy bank to reach your target of :amount.', 'add_set_amount_to_piggy' => 'Add :amount to fill this piggy bank on :date', 'delete_piggy_bank' => 'Delete piggy bank ":name"', + 'cannot_add_amount_piggy' => 'Could not add :amount to ":name".', + 'deleted_piggy_bank' => 'Deleted piggy bank ":name"', + 'added_amount_to_piggy' => 'Added :amount to ":name"', + 'removed_amount_from_piggy' => 'Removed :amount from ":name"', + 'cannot_remove_amount_piggy' => 'Could not remove :amount from ":name".', // tags 'regular_tag' => 'Just a regular tag.', 'balancing_act' => 'The tag takes at most two transactions; an expense and a transfer. They\'ll balance each other out.', 'advance_payment' => 'The tag accepts one expense and any number of deposits aimed to repay the original expense.', 'delete_tag' => 'Supprimer le tag ":tag"', + 'deleted_tag' => 'Deleted tag ":tag"', 'new_tag' => 'Make new tag', 'edit_tag' => 'Editer le tag ":tag"', + 'updated_tag' => 'Updated tag ":tag"', + 'created_tag' => 'Tag ":tag" has been created!', 'no_year' => 'No year set', 'no_month' => 'No month set', 'tag_title_nothing' => 'Default tags', @@ -671,4 +780,10 @@ return [ 'tags_group' => 'Tags group transactions together, which makes it possible to store reimbursements (in case you front money for others) and other "balancing acts" where expenses are summed up (the payments on your new TV) or where expenses and deposits are cancelling each other out (buying something with saved money). It\'s all up to you. Using tags the old-fashioned way is of course always possible.', 'tags_start' => 'Create a tag to get started or enter tags when creating new transactions.', + + // administration + 'administration' => 'Administration', + 'user_administration' => 'User administration', + 'list_all_users' => 'All users', + 'all_users' => 'All users', ]; diff --git a/resources/lang/fr_FR/form.php b/resources/lang/fr_FR/form.php index c8c51e1134..d76859027d 100644 --- a/resources/lang/fr_FR/form.php +++ b/resources/lang/fr_FR/form.php @@ -74,7 +74,6 @@ return [ 'add_new_deposit' => 'Add a new deposit', 'add_new_transfer' => 'Add a new transfer', 'noPiggybank' => '(no piggy bank)', - 'noBudget' => '(no budget)', 'title' => 'Title', 'notes' => 'Notes', 'filename' => 'File name', @@ -113,8 +112,11 @@ return [ 'currency_areYouSure' => 'Are you sure you want to delete the currency named ":name"?', 'piggyBank_areYouSure' => 'Are you sure you want to delete the piggy bank named ":name"?', 'journal_areYouSure' => 'Are you sure you want to delete the transaction described ":description"?', + 'mass_journal_are_you_sure' => 'Are you sure you want to delete these transactions?', 'tag_areYouSure' => 'Are you sure you want to delete the tag ":tag"?', 'permDeleteWarning' => 'Deleting stuff from Firely is permanent and cannot be undone.', + 'mass_make_selection' => 'You can still prevent items from being deleted by removing the checkbox.', + 'delete_all_permanently' => 'Delete selected permanently', 'also_delete_transactions' => 'The only transaction connected to this account will be deleted as well.|All :count transactions connected to this account will be deleted as well.', 'also_delete_rules' => 'The only rule connected to this rule group will be deleted as well.|All :count rules connected to this rule group will be deleted as well.', 'also_delete_piggyBanks' => 'The only piggy bank connected to this account will be deleted as well.|All :count piggy bank connected to this account will be deleted as well.', diff --git a/resources/lang/fr_FR/help.php b/resources/lang/fr_FR/help.php index fba45bdb66..6cee914b70 100644 --- a/resources/lang/fr_FR/help.php +++ b/resources/lang/fr_FR/help.php @@ -10,22 +10,22 @@ return [ // tour! - 'main-content-title' => 'Bienvenue sur Firefly III', - 'main-content-text' => 'Do yourself a favor and follow this short guide to make sure you know your way around.', - 'sidebar-toggle-title' => 'Sidebar to create stuff', - 'sidebar-toggle-text' => 'Hidden under the plus icon are all the buttons to create new stuff. Accounts, transactions, everything!', - 'account-menu-title' => 'All your accounts', - 'account-menu-text' => 'Here you can find all the accounts you\'ve made.', - 'budget-menu-title' => 'Budgets', - 'budget-menu-text' => 'Use this page to organise your finances and limit spending.', - 'report-menu-title' => 'Rapport', - 'report-menu-text' => 'Check this out when you want a solid overview of your fiances.', - 'transaction-menu-title' => 'Transactions', - 'transaction-menu-text' => 'Toutes les transactions que vous avez créé peuvent être trouvées ici.', - 'option-menu-title' => 'Options', - 'option-menu-text' => 'C\'est assez explicite.', - 'main-content-end-title' => 'Fin !', - 'main-content-end-text' => 'N\'oubliez pas que chaque page a un petit point d\'interrogation en haut à droite. Cliquez dessus pour obtenir de l\'aide concernant la page actuelle.', + 'main-content-title' => 'Bienvenue sur Firefly III', + 'main-content-text' => 'Do yourself a favor and follow this short guide to make sure you know your way around.', + 'sidebar-toggle-title' => 'Sidebar to create stuff', + 'sidebar-toggle-text' => 'Hidden under the plus icon are all the buttons to create new stuff. Accounts, transactions, everything!', + 'account-menu-title' => 'All your accounts', + 'account-menu-text' => 'Here you can find all the accounts you\'ve made.', + 'budget-menu-title' => 'Budgets', + 'budget-menu-text' => 'Use this page to organise your finances and limit spending.', + 'report-menu-title' => 'Rapport', + 'report-menu-text' => 'Check this out when you want a solid overview of your finances.', + 'transaction-menu-title' => 'Transactions', + 'transaction-menu-text' => 'Toutes les transactions que vous avez créé peuvent être trouvées ici.', + 'option-menu-title' => 'Options', + 'option-menu-text' => 'C\'est assez explicite.', + 'main-content-end-title' => 'Fin !', + 'main-content-end-text' => 'N\'oubliez pas que chaque page a un petit point d\'interrogation en haut à droite. Cliquez dessus pour obtenir de l\'aide concernant la page actuelle.', 'index' => 'index', 'home' => 'home', 'accounts-index' => 'accounts.index', diff --git a/resources/lang/fr_FR/list.php b/resources/lang/fr_FR/list.php index 958a32daf7..4929e32564 100644 --- a/resources/lang/fr_FR/list.php +++ b/resources/lang/fr_FR/list.php @@ -8,34 +8,48 @@ */ return [ - 'name' => 'Nom', - 'role' => 'Rôle', - 'currentBalance' => 'Solde courant', - 'active' => 'Actif ?', - 'lastActivity' => 'Activité récente', - 'balanceDiff' => 'Difference solde entre :start et :end', - 'matchedOn' => 'Matched on', - 'matchesOn' => 'Matched on', - 'matchingAmount' => 'Montant', - 'lastMatch' => 'Last match', - 'expectedMatch' => 'Expected match', - 'automatch' => 'Auto match?', - 'repeat_freq' => 'Repeats', - 'description' => 'Description', - 'amount' => 'Amount', - 'date' => 'Date', - 'interest_date' => 'Interest date', - 'book_date' => 'Book date', - 'process_date' => 'Processing date', - 'from' => 'From', - 'to' => 'To', - 'budget' => 'Budget', - 'category' => 'Category', - 'bill' => 'Bill', - 'withdrawal' => 'Withdrawal', - 'deposit' => 'Deposit', - 'transfer' => 'Transfer', - 'type' => 'Type', - 'completed' => 'Completed', - 'iban' => 'IBAN', + 'buttons' => 'Buttons', + 'icon' => 'Icon', + 'create_date' => 'Created at', + 'update_date' => 'Updated at', + 'balance_before' => 'Balance before', + 'balance_after' => 'Balance after', + 'name' => 'Nom', + 'role' => 'Rôle', + 'currentBalance' => 'Solde courant', + 'active' => 'Actif ?', + 'lastActivity' => 'Activité récente', + 'balanceDiff' => 'Difference solde entre :start et :end', + 'matchedOn' => 'Matched on', + 'matchesOn' => 'Matched on', + 'matchingAmount' => 'Montant', + 'lastMatch' => 'Last match', + 'expectedMatch' => 'Expected match', + 'automatch' => 'Auto match?', + 'repeat_freq' => 'Repeats', + 'description' => 'Description', + 'amount' => 'Amount', + 'date' => 'Date', + 'interest_date' => 'Interest date', + 'book_date' => 'Book date', + 'process_date' => 'Processing date', + 'from' => 'From', + 'to' => 'To', + 'budget' => 'Budget', + 'category' => 'Category', + 'bill' => 'Bill', + 'withdrawal' => 'Withdrawal', + 'deposit' => 'Deposit', + 'transfer' => 'Transfer', + 'type' => 'Type', + 'completed' => 'Completed', + 'iban' => 'IBAN', + 'paid_current_period' => 'Paid this period', + 'email' => 'Email', + 'registered_at' => 'Registered at', + 'is_activated' => 'Is activated', + 'is_blocked' => 'Is blocked', + 'is_admin' => 'Is admin', + 'has_two_factor' => 'Has 2FA', + 'blocked_code' => 'Block code', ]; diff --git a/resources/lang/nl_NL/config.php b/resources/lang/nl_NL/config.php index 278af0ab7a..2deb526a72 100644 --- a/resources/lang/nl_NL/config.php +++ b/resources/lang/nl_NL/config.php @@ -17,4 +17,5 @@ return [ 'quarter_of_year' => '%B %Y', 'year' => '%Y', 'half_year' => '%B %Y', + ]; diff --git a/resources/lang/nl_NL/firefly.php b/resources/lang/nl_NL/firefly.php index c62de23863..1939aedbcf 100644 --- a/resources/lang/nl_NL/firefly.php +++ b/resources/lang/nl_NL/firefly.php @@ -31,8 +31,8 @@ return [ 'bounced_error' => 'Het emailtje naar :email kwam nooit aan.', 'deleted_error' => 'Deze gegevens zijn niet correct.', 'general_blocked_error' => 'Je account is uitgeschakeld, je kan helaas niet inloggen.', - 'expired_error' => 'Je account is verlopen, je kan helaas niet inloggen.', - 'unbalanced_error' => 'Je kasboek is uit balans. Dat betekent dat er een uitgave, inkomsten of overschrijving niet netjes is opgeslagen. Kijk goed of je ergens een fout kan vinden (afwijkend bedrag: :amount).', + 'expired_error' => 'Je account is verlopen en kan niet meer worden gebruikt.', + 'unbalanced_error' => 'Je transacties zijn uit balans. Eén of meerdere overschrijvingen, uitgaves of inkomsten zijn niet goed opgeslagen. Controleer je rekeningen en transacties (je bent :amount uit balans).', 'removed_amount' => ':amount weggehaald', 'added_amount' => ':amount toegevoegd', 'asset_account_role_help' => 'Voorkeuren die voortkomen uit je keuze hier kan je later aangeven.', @@ -69,7 +69,14 @@ return [ 'warning_much_data' => 'Het kan even duren voor :days dagen aan gegevens geladen zijn.', 'registered' => 'Je bent geregistreerd!', 'search' => 'Zoeken', + 'no_budget_pointer' => 'Je hebt nog geen budgetten. Maak er een aantal op de budgetten-pagina. Met budgetten kan je je uitgaven beter bijhouden.', + // repeat frequencies: + 'repeat_freq_monthly' => 'maandelijks', + 'weekly' => 'Wekelijks', + 'quarterly' => 'Elk kwartaal', + 'half-year' => 'Elk half jaar', + 'yearly' => 'Jaarlijks', // account confirmation: 'confirm_account_header' => 'Bevestig je account', 'confirm_account_intro' => 'TIjdens het registreren heb je een mailtje gehad. Kijk daar in voor instructies. Als je het mailtje niet hebt gehad, kan Firefly je een nieuwe sturen.', @@ -311,6 +318,7 @@ return [ 'title_transfer' => 'Overboekingen', 'title_transfers' => 'Overboekingen', + // csv import: 'csv_import' => 'Importeer CSV-bestand', 'csv' => 'CSV', @@ -461,9 +469,18 @@ return [ 'update_budget' => 'Budget bijwerken', // bills: + 'matching_on' => 'Wordt herkend', + 'between_amounts' => 'tussen :low en :high.', + 'repeats' => 'Herhaalt', + 'connected_journals' => 'Verbonden transacties', + 'auto_match_on' => 'Automatisch herkend door Firefly', + 'auto_match_off' => 'Niet automatisch herkend door Firefly', + 'next_expected_match' => 'Volgende verwachte transactie', 'delete_bill' => 'Verwijder contract ":name"', 'deleted_bill' => 'Contract ":name" verwijderd', 'edit_bill' => 'Wijzig contract ":name"', + 'more' => 'Meer', + 'rescan_old' => 'Scan oude transacties opnieuw', 'update_bill' => 'Wijzig contract', 'updated_bill' => 'Contract ":name" geüpdatet', 'store_new_bill' => 'Sla nieuw contract op', @@ -507,6 +524,7 @@ return [ 'save_transactions_by_moving' => 'Bewaar deze transacties door ze aan een andere rekening te koppelen:', 'stored_new_account' => 'Nieuwe rekening ":name" opgeslagen!', 'updated_account' => 'Rekening ":name" geüpdatet', + 'credit_card_options' => 'Opties voor credit cards', // categories: 'new_category' => 'Nieuwe categorie', @@ -538,6 +556,13 @@ return [ 'deleted_deposit' => 'Inkomsten ":description" verwijderd', 'deleted_transfer' => 'Overschrijving ":description" verwijderd', 'stored_journal' => 'Nieuw transactie ":description" opgeslagen', + 'select_transactions' => 'Selecteer transacties', + 'stop_selection' => 'Stop met selecteren', + 'edit_selected' => 'Wijzig geselecteerden', + 'delete_selected' => 'Verwijder geselecteerden', + 'mass_delete_journals' => 'Verwijder een aantal transacties', + 'perm-delete-many' => 'Veel items in één keer verwijderen kan zeer storend zijn. Wees voorzichtig.', + // new user: 'welcome' => 'Welkom bij Firefly!', @@ -641,6 +666,7 @@ return [ 'noCategory' => '(zonder categorie)', 'notCharged' => '(Nog) niet betaald', 'inactive' => 'Niet actief', + 'active' => 'Actief', 'difference' => 'Verschil', 'in' => 'In', 'out' => 'Uit', @@ -655,9 +681,9 @@ return [ 'categories_spent_in_year' => 'Categorieën (uitgaven)', 'report_type' => 'Rapporttype', 'report_type_default' => 'Standard financieel rapport', - 'more_info_help' => 'Meer informatie over deze rapportages vind je in de helppagina\'s. Klik op de (?) in de rechterbovenhoek.', 'report_type_audit' => 'Transactiehistorie-overzicht (audit)', - 'report_type_meta-history' => 'Categorieën, budgetten en contractenoverzicht', + 'report_type_meta-history' => 'Overzicht van categorieën, budgetten en contracten', + 'more_info_help' => 'Meer informatie over deze rapporten vind je in de hulppagina\'s. Klik daarvoor op het (?) icoontje rechtsboven.', 'report_included_accounts' => 'Accounts in rapport', 'report_date_range' => 'Datumbereik', 'report_include_help' => 'Overboekingen naar gedeelde rekeningen tellen als uitgave. Overboekingen van gedeelde rekeningen tellen als inkomsten.', @@ -673,6 +699,7 @@ return [ 'audit_end_balance' => 'Aan het einde van de dag, :end, was het saldo van betaalrekening :account_name :balance', // charts: + 'chart' => 'Diagram', 'dayOfMonth' => 'Dag vd maand', 'month' => 'Maand', 'budget' => 'Budget', diff --git a/resources/lang/nl_NL/form.php b/resources/lang/nl_NL/form.php index b4081cd8ab..f334536bdc 100644 --- a/resources/lang/nl_NL/form.php +++ b/resources/lang/nl_NL/form.php @@ -112,8 +112,11 @@ return [ 'currency_areYouSure' => 'Weet je zeker dat je de valuta met naam ":name" wilt verwijderen?', 'piggyBank_areYouSure' => 'Weet je zeker dat je het spaarpotje met naam ":name" wilt verwijderen?', 'journal_areYouSure' => 'Weet je zeker dat je de transactie met naam ":description" wilt verwijderen?', + 'mass_journal_are_you_sure' => 'Weet je zeker dat je al deze transacties wilt verwijderen?', 'tag_areYouSure' => 'Weet je zeker dat je de tag met naam ":tag" wilt verwijderen?', 'permDeleteWarning' => 'Dingen verwijderen uit Firefly is permanent en kan niet ongedaan gemaakt worden.', + 'mass_make_selection' => 'Je kan items alsnog redden van de ondergang door het vinkje weg te halen.', + 'delete_all_permanently' => 'Verwijder geselecteerde items permanent', 'also_delete_transactions' => 'Ook de enige transactie verbonden aan deze rekening wordt verwijderd.|Ook alle :count transacties verbonden aan deze rekening worden verwijderd.', 'also_delete_rules' => 'De enige regel in deze regelgroep wordt ook verwijderd.|Alle :count regels in deze regelgroep worden ook verwijderd.', 'also_delete_piggyBanks' => 'Ook het spaarpotje verbonden aan deze rekening wordt verwijderd.|Ook alle :count spaarpotjes verbonden aan deze rekening worden verwijderd.', diff --git a/resources/lang/nl_NL/validation.php b/resources/lang/nl_NL/validation.php old mode 100755 new mode 100644 diff --git a/resources/lang/pt_BR/config.php b/resources/lang/pt_BR/config.php index 4cd0169fd9..808415797c 100644 --- a/resources/lang/pt_BR/config.php +++ b/resources/lang/pt_BR/config.php @@ -13,8 +13,9 @@ return [ 'month_and_day' => '%e de %B de %Y', 'date_time' => '%B %e, %Y, @ %T', 'specific_day' => '%e %B %Y', - 'week_in_year' => 'Week %W, %Y', + 'week_in_year' => 'Semana %W, %Y', 'quarter_of_year' => '%B %Y', 'year' => '%Y', 'half_year' => '%B %Y', + ]; diff --git a/resources/lang/pt_BR/firefly.php b/resources/lang/pt_BR/firefly.php index 1715cfafb4..21e7fc9ed6 100644 --- a/resources/lang/pt_BR/firefly.php +++ b/resources/lang/pt_BR/firefly.php @@ -9,14 +9,14 @@ return [ // general stuff: - 'language_incomplete' => 'This language is not yet fully translated', + 'language_incomplete' => 'Este idioma não está totalmente traduzido', 'test' => 'Você selecionou Inglês', 'close' => 'Fechar', 'pleaseHold' => 'Por favor espere...', 'actions' => 'Ações', 'edit' => 'Editar', 'delete' => 'Apagar', - 'welcomeBack' => 'What\'s playing?', + 'welcomeBack' => 'O que está passando?', 'everything' => 'Tudo', 'customRange' => 'Intervalo Personalizado', 'apply' => 'Aplicar', @@ -26,11 +26,13 @@ return [ 'total_sum' => 'Soma Total', 'period_sum' => 'Soma por período', 'showEverything' => 'Mostrar tudo', - 'never' => 'Never', + 'never' => 'Nunca', 'search_results_for' => 'Pesquisar resultados por ":query"', 'bounced_error' => 'A mensagem enviado para :email ressaltado, não tem acesso para você.', 'deleted_error' => 'Estas credenciais não correspondem aos nossos registros.', 'general_blocked_error' => 'Sua conta foi desativada, você não pode entrar.', + 'expired_error' => 'Your account has expired, and can no longer be used.', + 'unbalanced_error' => 'Your transactions are unbalanced. This means a withdrawal, deposit or transfer was not stored properly. Please check your accounts and transactions for errors (unbalanced amount :amount).', 'removed_amount' => ':amount removido', 'added_amount' => ':amount adicionada', 'asset_account_role_help' => 'Quaisquer opções extras resultantes da sua escolha pode ser definido mais tarde.', @@ -44,108 +46,143 @@ return [ 'new_revenue_account' => 'Nova conta de receita', 'new_budget' => 'Novo orçamento', 'new_bill' => 'Nova fatura', - 'block_account_logout' => 'You have been logged out. Blocked accounts cannot use this site. Did you register with a valid email address?', - 'flash_success' => 'Success!', - 'flash_info' => 'Message', - 'flash_warning' => 'Warning!', - 'flash_error' => 'Error!', - 'flash_info_multiple' => 'There is one message|There are :count messages', - 'flash_error_multiple' => 'There is one error|There are :count errors', - 'net_worth' => 'Net worth', + 'block_account_logout' => 'Você foi desconectado. Contas bloqueadas não podem usar este site. Você se registrou com um email válido?', + 'flash_success' => 'Sucesso!', + 'flash_info' => 'Mensagem', + 'flash_warning' => 'Atenção!', + 'flash_error' => 'Erro!', + 'flash_info_multiple' => 'Há uma mensagem|Existem :count mensagens', + 'flash_error_multiple' => 'Houve um erro|Houve :count erros', + 'net_worth' => 'Valor Líquido', + 'route_has_no_help' => 'Não existe ajuda para esta rota, ou não existe ajuda disponível em seu idioma.', + 'two_factor_welcome' => 'Olá, :user!', + 'two_factor_enter_code' => 'Para continuar, por favor, digite seu código de autenticação em duas etapas. Seu aplicativo pode gerá-lo para você.', + 'two_factor_code_here' => 'Insira o código aqui', + 'two_factor_title' => 'Autenticação em duas etapas', + 'authenticate' => 'Autenticar', + 'two_factor_forgot_title' => 'Perdeu autenticação em duas etapas', + 'two_factor_forgot' => 'Esqueci minha autenticação em duas etapas.', + 'two_factor_lost_header' => 'Perdeu sua autenticação em duas etapas?', + 'two_factor_lost_intro' => 'Infelizmente, isso não é algo que você pode redefinir a partir da interface web. Você tem duas opções.', + 'two_factor_lost_fix_self' => 'Se você executar sua própria instância do Firefly III, verifique os logs no storage/logs para obter instruções.', + 'two_factor_lost_fix_owner' => 'Caso contrário, o proprietário do site :site_owner e peça para redefinir a sua autenticação de duas etapas.', + 'warning_much_data' => ':days dias de dados podem demorar um pouco para carregar.', + 'registered' => 'Você se registrou com sucesso!', + 'search' => 'Pesquisa', + 'no_budget_pointer' => 'You seem to have no budgets yet. You should create some on the budgets-page. Budgets can help you keep track of expenses.', + + // repeat frequencies: + 'repeat_freq_monthly' => 'monthly', + 'weekly' => 'Semanal', + 'quarterly' => 'Trimestral', + 'half-year' => 'Semestral', + 'yearly' => 'Anual', + // account confirmation: + 'confirm_account_header' => 'Por favor, confirme sua conta', + 'confirm_account_intro' => 'Um e-mail foi enviado para o endereço que você usou durante o seu registro. Por favor confira-o para mais instruções. Se não recebeu esta mensagem, podemos enviá-lo novamente.', + 'confirm_account_resend_email' => 'Envie-me a mensagem de confirmação para eu ativar minha conta.', + 'account_is_confirmed' => 'Sua conta foi confirmada!', + 'invalid_activation_code' => 'Parece que você está usando o código não é válido ou expirado.', + 'confirm_account_is_resent_header' => 'A confirmação foi reenviada', + 'confirm_account_is_resent_text' => 'A mensagem de confirmação foi reenviada. Se ainda não receber a mensagem de confirmação, entre em contato com o proprietário do site em :owner ou verifique os arquivos de log para ver o que deu errado.', + 'confirm_account_is_resent_go_home' => 'Vá para a página de índice do Firefly', + 'confirm_account_not_resent_header' => 'Algo deu errado :(', + 'confirm_account_not_resent_intro' => 'A mensagem de confirmação não foi reenviada. Se ainda não recebeu a mensagem de confirmação, entre em contato com o proprietário do site através do email :owner. Possivelmente, você já tentou reenviar a mensagem de ativação, muitas vezes. Firefly III tentará reenviar a mensagem de confirmação a cada hora.', + 'confirm_account_not_resent_go_home' => 'Vá para a página de índice do Firefly', // export data: - 'import_and_export' => 'Import and export', - 'export_data' => 'Export data', - 'export_data_intro' => 'For backup purposes, when migrating to another system or when migrating to another Firefly III installation.', - 'export_format' => 'Export format', - 'export_format_csv' => 'Comma separated values (CSV file)', - 'export_format_mt940' => 'MT940 compatible format', - 'export_included_accounts' => 'Export transactions from these accounts', - 'include_config_help' => 'For easy re-import into Firefly III', - 'include_old_uploads_help' => 'Firefly III does not throw away the original CSV files you have imported in the past. You can include them in your export.', - 'do_export' => 'Export', - 'export_status_never_started' => 'The export has not started yet', - 'export_status_make_exporter' => 'Creating exporter thing...', - 'export_status_collecting_journals' => 'Collecting your transactions...', - 'export_status_collected_journals' => 'Collected your transactions!', - 'export_status_converting_to_export_format' => 'Converting your transactions...', - 'export_status_converted_to_export_format' => 'Converted your transactions!', - 'export_status_creating_journal_file' => 'Creating the export file...', - 'export_status_created_journal_file' => 'Created the export file!', - 'export_status_collecting_attachments' => 'Collecting all your attachments...', - 'export_status_collected_attachments' => 'Collected all your attachments!', - 'export_status_collecting_old_uploads' => 'Collecting all your previous uploads...', - 'export_status_collected_old_uploads' => 'Collected all your previous uploads!', - 'export_status_creating_config_file' => 'Creating a configuration file...', - 'export_status_created_config_file' => 'Created a configuration file!', - 'export_status_creating_zip_file' => 'Creating a zip file...', - 'export_status_created_zip_file' => 'Created a zip file!', - 'export_status_finished' => 'Export has succesfully finished! Yay!', - 'export_data_please_wait' => 'Please wait...', - 'attachment_explanation' => 'The file called \':attachment_name\' (#:attachment_id) was originally uploaded to :type \':description\' (#:journal_id) dated :date for the amount of :amount.', + 'import_and_export' => 'Importar / Exportar', + 'export_data' => 'Exportar dados', + 'export_data_intro' => 'Para fins de backup, ao migrar para outro sistema ou ao migrar para outra instalação de Firefly III.', + 'export_format' => 'Formato de exportação', + 'export_format_csv' => 'Valores separados por vírgula (arquivo CSV)', + 'export_format_mt940' => 'Compatível com formato MT940', + 'export_included_accounts' => 'Operações de exportação destas contas', + 'include_config_help' => 'Para fácil re-importar para Firefly III', + 'include_old_uploads_help' => 'O Firefly III não joga fora os arquivos CSV originais que você importou no passado. Você pode incluí-los em sua exportação.', + 'do_export' => 'Exportar', + 'export_status_never_started' => 'A exportação ainda não foi iniciada', + 'export_status_make_exporter' => 'Criar o exportador...', + 'export_status_collecting_journals' => 'Coletando suas transações...', + 'export_status_collected_journals' => 'Suas transações foram coletadas!', + 'export_status_converting_to_export_format' => 'Convertendo suas transações...', + 'export_status_converted_to_export_format' => 'Suas transações foram convertidas!', + 'export_status_creating_journal_file' => 'Criando o arquivo de exportação...', + 'export_status_created_journal_file' => 'Criado o arquivo de exportação!', + 'export_status_collecting_attachments' => 'Recolher todos os seus anexos...', + 'export_status_collected_attachments' => 'Recolhidos todos os seus anexos!', + 'export_status_collecting_old_uploads' => 'Recolher todos os seus envios anteriores...', + 'export_status_collected_old_uploads' => 'Recolhidos todos os seus envios anteriores!', + 'export_status_creating_config_file' => 'Criando um arquivo de configuração...', + 'export_status_created_config_file' => 'Criado um arquivo de configuração!', + 'export_status_creating_zip_file' => 'Criando um arquivo zip...', + 'export_status_created_zip_file' => 'Criado um arquivo zip!', + 'export_status_finished' => 'Exportação terminou com sucesso! Yay!', + 'export_data_please_wait' => 'Por favor aguarde...', + 'attachment_explanation' => 'O arquivo chamado \':attachment_name\' (#:attachment_id) foi originalmente enviado para: tipo \':description\' (#:journal_id) datado em :date para a quantia de :amount.', // rules - 'rules' => 'Rules', + 'rules' => 'Regras', 'rules_explanation' => 'Here you can manage rules. Rules are triggered when a transaction is created or updated. Then, if the transaction has certain properties (called "triggers") Firefly will execute the "actions". Combined, you can make Firefly respond in a certain way to new transactions.', - 'rule_name' => 'Name of rule', - 'rule_triggers' => 'Rule triggers when', - 'rule_actions' => 'Rule will', - 'new_rule' => 'New rule', - 'new_rule_group' => 'New rule group', - 'rule_priority_up' => 'Give rule more priority', - 'rule_priority_down' => 'Give rule less priority', - 'make_new_rule_group' => 'Make new rule group', - 'store_new_rule_group' => 'Store new rule group', - 'created_new_rule_group' => 'New rule group ":title" stored!', - 'updated_rule_group' => 'Successfully updated rule group ":title".', - 'edit_rule_group' => 'Edit rule group ":title"', - 'delete_rule_group' => 'Delete rule group ":title"', - 'deleted_rule_group' => 'Deleted rule group ":title"', - 'update_rule_group' => 'Update rule group', - 'no_rules_in_group' => 'There are no rules in this group', - 'move_rule_group_up' => 'Move rule group up', - 'move_rule_group_down' => 'Move rule group down', - 'save_rules_by_moving' => 'Save these rule(s) by moving them to another rule group:', - 'make_new_rule' => 'Make new rule in rule group ":title"', - 'rule_help_stop_processing' => 'When you check this box, later rules in this group will not be executed.', - 'rule_help_active' => 'Inactive rules will never fire.', - 'stored_new_rule' => 'Stored new rule with title ":title"', - 'deleted_rule' => 'Deleted rule with title ":title"', - 'store_new_rule' => 'Store new rule', - 'updated_rule' => 'Updated rule with title ":title"', - 'default_rule_group_name' => 'Default rules', - 'default_rule_group_description' => 'All your rules not in a particular group.', - 'default_rule_name' => 'Your first default rule', - 'default_rule_description' => 'This rule is an example. You can safely delete it.', - 'default_rule_trigger_description' => 'The Man Who Sold the World', + 'rule_name' => 'Nome da regra', + 'rule_triggers' => 'Regra dispara quando', + 'rule_actions' => 'Regra será', + 'new_rule' => 'Nova regra', + 'new_rule_group' => 'Novo grupo de regras', + 'rule_priority_up' => 'Dar mais prioridade a regra', + 'rule_priority_down' => 'Dar a regra menos prioridade', + 'make_new_rule_group' => 'Fazer o novo grupo de regras', + 'store_new_rule_group' => 'Gravar novo grupo de regras', + 'created_new_rule_group' => 'Novo grupo de regras ":title" armazenado!', + 'updated_rule_group' => 'Grupo de regras atualizado com sucesso ":title".', + 'edit_rule_group' => 'Editar grupo de regra ": título"', + 'delete_rule_group' => 'Excluir grupo de regra ":title"', + 'deleted_rule_group' => 'Removido grupo de regra ":title"', + 'update_rule_group' => 'Atualizar um grupo de regra', + 'no_rules_in_group' => 'Não existem regras neste grupo', + 'move_rule_group_up' => 'Subir o grupo de regras', + 'move_rule_group_down' => 'Descer grupo de regras', + 'save_rules_by_moving' => 'Salve essas regra(s), movendo-os para outro grupo de regra:', + 'make_new_rule' => 'Fazer nova regra no grupo de regras ":title"', + 'rule_help_stop_processing' => 'Quando você marcar essa caixa, regras posteriores deste grupo não serão executadas.', + 'rule_help_active' => 'Regras inativas nunca serão disparadas.', + 'stored_new_rule' => 'Armazenado a nova regra com o título ":title"', + 'deleted_rule' => 'Regra excluída com o título ":title"', + 'store_new_rule' => 'Armazenar nova regra', + 'updated_rule' => 'Regra atualizada com o título ":title"', + 'default_rule_group_name' => 'Regras padrão', + 'default_rule_group_description' => 'Todas as suas regras, não estão em um grupo específico.', + 'default_rule_name' => 'Sua primeira regra padrão', + 'default_rule_description' => 'Esta regra é um exemplo. Você pode excluí-la com segurança.', + 'default_rule_trigger_description' => 'O homem que vendeu o mundo', 'default_rule_trigger_from_account' => 'David Bowie', - 'default_rule_action_prepend' => 'Bought the world from ', - 'default_rule_action_set_category' => 'Large expenses', - 'trigger' => 'Trigger', - 'trigger_value' => 'Trigger on value', - 'stop_processing_other_triggers' => 'Stop processing other triggers', - 'add_rule_trigger' => 'Add new trigger', - 'action' => 'Action', - 'action_value' => 'Action value', - 'stop_executing_other_actions' => 'Stop executing other actions', - 'add_rule_action' => 'Add new action', - 'edit_rule' => 'Edit rule ":title"', - 'delete_rule' => 'Delete rule ":title"', - 'update_rule' => 'Update rule', - 'test_rule_triggers' => 'See matching transactions', + 'default_rule_action_prepend' => 'Comprei o mundo a partir ', + 'default_rule_action_set_category' => 'Grandes despesas', + 'trigger' => 'Disparo', + 'trigger_value' => 'Disparo no valor', + 'stop_processing_other_triggers' => 'Parar o processamento de outros gatilhos', + 'add_rule_trigger' => 'Adicionar novo disparador', + 'action' => 'Ação', + 'action_value' => 'Valor da ação', + 'stop_executing_other_actions' => 'Parar de executar outras ações', + 'add_rule_action' => 'Adicionar nova ação', + 'edit_rule' => 'Editar regra ":title"', + 'delete_rule' => 'Excluir a regra ":title"', + 'update_rule' => 'Atualizar Regra', + 'test_rule_triggers' => 'Veja transações equivalentes', 'warning_transaction_subset' => 'For performance reasons this list is limited to :max_num_transactions and may only show a subset of matching transactions', 'warning_no_matching_transactions' => 'No matching transactions found. Please note that for performance reasons, only the last :num_transactions transactions have been checked.', - 'warning_no_valid_triggers' => 'No valid triggers provided.', - 'execute_on_existing_transactions' => 'Execute for existing transactions', - 'execute_on_existing_transactions_intro' => 'When a rule or group has been changed or added, you can execute it for existing transactions', - 'execute_on_existing_transactions_short' => 'Existing transactions', + 'warning_no_valid_triggers' => 'Sem gatilhos válidos fornecidos.', + 'execute_on_existing_transactions' => 'Executar transações existentes', + 'execute_on_existing_transactions_intro' => 'Quando uma regra ou um grupo for alterado ou adicionado, você pode executá-lo para transações existentes', + 'execute_on_existing_transactions_short' => 'Transações existentes', 'executed_group_on_existing_transactions' => 'Executed group ":title" for existing transactions', 'execute_group_on_existing_transactions' => 'Execute group ":title" for existing transactions', 'include_transactions_from_accounts' => 'Include transactions from these accounts', - 'execute' => 'Execute', + 'execute' => 'Executar', // actions and triggers - 'rule_trigger_user_action' => 'User action is ":trigger_value"', + 'rule_trigger_user_action' => 'Ação do usuário é ":trigger_value"', 'rule_trigger_from_account_starts' => 'Source account starts with ":trigger_value"', 'rule_trigger_from_account_ends' => 'Source account ends with ":trigger_value"', 'rule_trigger_from_account_is' => 'Source account is ":trigger_value"', @@ -156,50 +193,50 @@ return [ 'rule_trigger_to_account_contains' => 'Destination account contains ":trigger_value"', 'rule_trigger_transaction_type' => 'Transaction is of type ":trigger_value"', 'rule_trigger_amount_less' => 'Amount is less than :trigger_value', - 'rule_trigger_amount_exactly' => 'Amount is :trigger_value', + 'rule_trigger_amount_exactly' => 'Quantia é: trigger_value', 'rule_trigger_amount_more' => 'Amount is more than :trigger_value', 'rule_trigger_description_starts' => 'Description starts with ":trigger_value"', 'rule_trigger_description_ends' => 'Description ends with ":trigger_value"', 'rule_trigger_description_contains' => 'Description contains ":trigger_value"', 'rule_trigger_description_is' => 'Description is ":trigger_value"', - 'rule_trigger_from_account_starts_choice' => 'Source account starts with..', - 'rule_trigger_from_account_ends_choice' => 'Source account ends with..', - 'rule_trigger_from_account_is_choice' => 'Source account is..', - 'rule_trigger_from_account_contains_choice' => 'Source account contains..', - 'rule_trigger_to_account_starts_choice' => 'Destination account starts with..', - 'rule_trigger_to_account_ends_choice' => 'Destination account ends with..', - 'rule_trigger_to_account_is_choice' => 'Destination account is..', - 'rule_trigger_to_account_contains_choice' => 'Destination account contains..', - 'rule_trigger_transaction_type_choice' => 'Transaction is of type..', - 'rule_trigger_amount_less_choice' => 'Amount is less than..', - 'rule_trigger_amount_exactly_choice' => 'Amount is..', - 'rule_trigger_amount_more_choice' => 'Amount is more than..', - 'rule_trigger_description_starts_choice' => 'Description starts with..', - 'rule_trigger_description_ends_choice' => 'Description ends with..', - 'rule_trigger_description_contains_choice' => 'Description contains..', - 'rule_trigger_description_is_choice' => 'Description is..', - 'rule_trigger_store_journal' => 'When a journal is created', - 'rule_trigger_update_journal' => 'When a journal is updated', - 'rule_action_set_category' => 'Set category to ":action_value"', - 'rule_action_clear_category' => 'Clear category', - 'rule_action_set_budget' => 'Set budget to ":action_value"', - 'rule_action_clear_budget' => 'Clear budget', - 'rule_action_add_tag' => 'Add tag ":action_value"', - 'rule_action_remove_tag' => 'Remove tag ":action_value"', - 'rule_action_remove_all_tags' => 'Remove all tags', - 'rule_action_set_description' => 'Set description to ":action_value"', - 'rule_action_append_description' => 'Append description with ":action_value"', - 'rule_action_prepend_description' => 'Prepend description with ":action_value"', - 'rule_action_set_category_choice' => 'Set category to..', - 'rule_action_clear_category_choice' => 'Clear any category', - 'rule_action_set_budget_choice' => 'Set budget to..', - 'rule_action_clear_budget_choice' => 'Clear any budget', - 'rule_action_add_tag_choice' => 'Add tag..', - 'rule_action_remove_tag_choice' => 'Remove tag..', - 'rule_action_remove_all_tags_choice' => 'Remove all tags', - 'rule_action_set_description_choice' => 'Set description to..', - 'rule_action_append_description_choice' => 'Append description with..', - 'rule_action_prepend_description_choice' => 'Prepend description with..', + 'rule_trigger_from_account_starts_choice' => 'Conta de origem começa com..', + 'rule_trigger_from_account_ends_choice' => 'Conta de origem termina com..', + 'rule_trigger_from_account_is_choice' => 'Conta de origem é..', + 'rule_trigger_from_account_contains_choice' => 'Conta de origem contém..', + 'rule_trigger_to_account_starts_choice' => 'Conta de destino começa com..', + 'rule_trigger_to_account_ends_choice' => 'Conta de destino termina com..', + 'rule_trigger_to_account_is_choice' => 'Conta de destino é..', + 'rule_trigger_to_account_contains_choice' => 'Conta de destino contém..', + 'rule_trigger_transaction_type_choice' => 'Transação é do tipo..', + 'rule_trigger_amount_less_choice' => 'Quantia é inferior a..', + 'rule_trigger_amount_exactly_choice' => 'Quantia é..', + 'rule_trigger_amount_more_choice' => 'Quantia é mais do que..', + 'rule_trigger_description_starts_choice' => 'Descrição começa com..', + 'rule_trigger_description_ends_choice' => 'Descrição termina com..', + 'rule_trigger_description_contains_choice' => 'Descrição contém..', + 'rule_trigger_description_is_choice' => 'Descrição é..', + 'rule_trigger_store_journal' => 'Quando um período é criado', + 'rule_trigger_update_journal' => 'Quando um período é atualizado', + 'rule_action_set_category' => 'Definir categoria para ":action_value"', + 'rule_action_clear_category' => 'Limpar categoria', + 'rule_action_set_budget' => 'Definir orçamento para ":action_value"', + 'rule_action_clear_budget' => 'Limpar orçamento', + 'rule_action_add_tag' => 'Adicionar tag ":action_value"', + 'rule_action_remove_tag' => 'Remover tag ":action_value"', + 'rule_action_remove_all_tags' => 'Remover todas as tags', + 'rule_action_set_description' => 'Definir descrição para ":action_value"', + 'rule_action_append_description' => 'Acrescentar a descrição com ":action_value"', + 'rule_action_prepend_description' => 'Preceder a descrição com ":action_value"', + 'rule_action_set_category_choice' => 'Definir a categoria para..', + 'rule_action_clear_category_choice' => 'Limpar qualquer categoria', + 'rule_action_set_budget_choice' => 'Definir orçamento para..', + 'rule_action_clear_budget_choice' => 'Limpar qualquer orçamento', + 'rule_action_add_tag_choice' => 'Adicionar tag..', + 'rule_action_remove_tag_choice' => 'Remover tag..', + 'rule_action_remove_all_tags_choice' => 'Remover todas as tags', + 'rule_action_set_description_choice' => 'Definir descrição para..', + 'rule_action_append_description_choice' => 'Acrescentar a descrição com..', + 'rule_action_prepend_description_choice' => 'Preceder a descrição com..', // tags 'store_new_tag' => 'Armazenar nova tag', @@ -222,21 +259,22 @@ return [ 'pref_6M' => 'Semestral', 'pref_languages' => 'Idiomas', 'pref_languages_help' => 'Firefly III suporta muitos idiomas. Qual você prefere?', - 'pref_custom_fiscal_year' => 'Fiscal year settings', - 'pref_custom_fiscal_year_label' => 'Enabled', - 'pref_custom_fiscal_year_help' => 'In countries that use a financial year other than January 1 to December 31, you can switch this on and specify start / end days of the fiscal year', - 'pref_fiscal_year_start_label' => 'Fiscal year start date', - 'pref_two_factor_auth' => '2-step verification', - 'pref_two_factor_auth_help' => 'When you enable 2-step verification (also known as two-factor authentication), you add an extra layer of security to your account. You sign in with something you know (your password) and something you have (a verification code). Verification codes are generated by an application on your phone, such as Authy or Google Authenticator.', - 'pref_enable_two_factor_auth' => 'Enable 2-step verification', - 'pref_two_factor_auth_disabled' => '2-step verification code removed and disabled', - 'pref_two_factor_auth_remove_it' => 'Don\'t forget to remove the account from your authentication app!', - 'pref_two_factor_auth_code' => 'Verify code', - 'pref_two_factor_auth_code_help' => 'Scan the QR code with an application on your phone such as Authy or Google Authenticator and enter the generated code.', - 'pref_two_factor_auth_reset_code' => 'Reset verification code', - 'pref_two_factor_auth_remove_code' => 'Remove verification code', - 'pref_two_factor_auth_remove_will_disable' => '(this will also disable two-factor authentication)', + 'pref_custom_fiscal_year' => 'Configurações de ano fiscal', + 'pref_custom_fiscal_year_label' => 'Habilitado', + 'pref_custom_fiscal_year_help' => 'Nos países que usam um exercício diferente de 1 de Janeiro a 31 de Dezembro, você pode ativar isto e especificar início / fim do ano fiscal', + 'pref_fiscal_year_start_label' => 'Data de início de ano fiscal', + 'pref_two_factor_auth' => 'Verificação em duas etapas', + 'pref_two_factor_auth_help' => 'Quando você habilitar verificação em 2-passos (também conhecido como Two Factor Authentication), você adicionar uma camada extra de segurança para sua conta. Você entra com alguma coisa que você sabe (sua senha) e algo que você tem (um código de verificação). Os códigos de verificação são gerados por um aplicativo em seu telefone, como Authy ou Google Authenticator.', + 'pref_enable_two_factor_auth' => 'Habilitar a verificação de 2 etapas', + 'pref_two_factor_auth_disabled' => 'código de verificação em 2 etapas removido e desativado', + 'pref_two_factor_auth_remove_it' => 'Não se esqueça de remover a conta de seu aplicativo de autenticação!', + 'pref_two_factor_auth_code' => 'Verificar código', + 'pref_two_factor_auth_code_help' => 'Scaneie o código QR com um aplicativo em seu telefone como Authy ou Google Authenticator e insira o código gerado.', + 'pref_two_factor_auth_reset_code' => 'Redefinir o código de verificação', + 'pref_two_factor_auth_remove_code' => 'Remover o código de verificação', + 'pref_two_factor_auth_remove_will_disable' => '(isso também irá desativar a autenticação de duas etapas)', 'pref_save_settings' => 'Salvar definições', + 'saved_preferences' => 'Preferências salvas!', // profile: 'change_your_password' => 'Alterar sua senha', @@ -245,7 +283,7 @@ return [ 'new_password' => 'Nova senha', 'new_password_again' => 'Nova senha (novamente)', 'delete_your_account' => 'Apagar sua conta', - 'delete_your_account_help' => 'Deleting your account will also delete any accounts, transactions, anything you might have saved into Firefly III. It\'ll be GONE.', + 'delete_your_account_help' => 'Excluindo sua conta também vai apagar quaisquer contas, transações, qualquer coisa que você pode ter salvo no Firefly III. Tudo será perdido.', 'delete_your_account_password' => 'Coloque sua senha para continuar.', 'password' => 'Senha', 'are_you_sure' => 'Você tem certeza? Você não poderá desfazer isso.', @@ -255,6 +293,7 @@ return [ 'should_change' => 'A idéia é alterar sua senha.', 'invalid_password' => 'Senha inválida!', + // attachments 'nr_of_attachments' => 'Um anexo|:count anexos', 'attachments' => 'Anexos', @@ -262,6 +301,7 @@ return [ 'update_attachment' => 'Atualizar anexo', 'delete_attachment' => 'Apagar anexo ":name"', 'attachment_deleted' => 'Anexo apagado ":name"', + 'attachment_updated' => 'Anexo atualizado ":name"', 'upload_max_file_size' => 'Tamanho máximo do arquivo: :size', // tour: @@ -278,6 +318,7 @@ return [ 'title_transfer' => 'Transferências', 'title_transfers' => 'Transferências', + // csv import: 'csv_import' => 'Importar arquivo CSV', 'csv' => 'CSV', @@ -285,12 +326,12 @@ return [ 'csv_define_column_roles' => 'Definir papeis da coluna', 'csv_map_values' => 'Valores mapeados encontrados para valores existentes', 'csv_download_config' => 'Download do arquivo CSV de configuração.', - 'csv_index_text' => 'This form allows you to import a CSV file with transactions into Firefly. It is based on the excellent CSV importer made by the folks at Atlassian. Simply upload your CSV file and follow the instructions. If you would like to learn more, please click on the button at the top of this page.', + 'csv_index_text' => 'Este formulário permite você importar um arquivo CSV com transações para dentro do Firefly. É baseado no excelente importador CSV feito pelo pessoal da Atlassian. Basta fazer upload de seu arquivo CSV e siga as instruções. Se você gostaria de aprender mais, por favor clique sobre o botão na parte superior desta página.', 'csv_index_beta_warning' => 'Esta ferramenta está em beta. Por favor proceder com cautela', - 'csv_header_help' => 'Check this box when your CSV file\'s first row consists of column names, not actual data', - 'csv_date_help' => 'Date time format in your CSV. Follow the format like this page indicates. The default value will parse dates that look like this: :dateExample.', - 'csv_csv_file_help' => 'Select the CSV file here. You can only upload one file at a time', - 'csv_csv_config_file_help' => 'Select your CSV import configuration here. If you do not know what this is, ignore it. It will be explained later.', + 'csv_header_help' => 'Selecione esta caixa quando a primeira linha do arquivo CSV consiste em nomes de colunas, os dados não reais', + 'csv_date_help' => 'Formato de hora de data em seu CSV. Siga o formato como indica esta página. O valor padrão analisará datas que se parecem com isso: :dateExample.', + 'csv_csv_file_help' => 'Selecione o arquivo CSV aqui. Você só pode carregar um arquivo de cada vez', + 'csv_csv_config_file_help' => 'Selecione a configuração de importação CSV aqui. Se você não sabe o que é isso, ignore. Será explicado mais tarde.', 'csv_upload_button' => 'Iniciando importação do CSV', 'csv_column_roles_title' => 'Definir papeis da coluna', 'csv_column_roles_text' => 'Firefly does not know what each column means. You need to indicate what every column is. Please check out the example data if you\'re not sure yourself. Click on the question mark (top right of the page) to learn what each column means. If you want to map imported data onto existing data in Firefly, use the checkbox. The next step will show you what this button does.', @@ -325,13 +366,13 @@ return [ 'csv_process_new_entries' => 'Firefly criou :imported nova(s) transação(ões)', 'csv_start_over' => 'Importar novamente', 'csv_to_index' => 'Voltar para tela inicial', - 'csv_upload_not_writeable' => 'Cannot write to the path mentioned here. Cannot upload', + 'csv_upload_not_writeable' => 'Não é possível gravar no caminho mencionado aqui. Não pode fazer o upload', 'csv_column__ignore' => '(ignorar esta coluna)', 'csv_column_account-iban' => 'Conta de Ativo (IBAN)', 'csv_column_account-id' => 'ID da Conta de Ativo (correspondente Firefly)', 'csv_column_account-name' => 'Conta de Ativo (nome)', 'csv_column_amount' => 'Valor', - 'csv_column_amount-comma-separated' => 'Amount (comma as decimal separator)', + 'csv_column_amount-comma-separated' => 'Auantia (vírgula como separador decimal)', 'csv_column_bill-id' => 'ID Fatura (correspondente Firefly)', 'csv_column_bill-name' => 'Nom da Fatura', 'csv_column_budget-id' => 'ID do Orçamento (correspondente Firefly)', @@ -342,12 +383,12 @@ return [ 'csv_column_currency-id' => 'ID da Moeda (correspondente Firefly)', 'csv_column_currency-name' => 'Nome da Moeda (correspondente Firefly)', 'csv_column_currency-symbol' => 'Símbolo da Moeda (correspondente Firefly)', - 'csv_column_date-rent' => 'Rent calculation date', + 'csv_column_date-rent' => 'Data de cálculo da renda', 'csv_column_date-transaction' => 'Data', 'csv_column_description' => 'Descrição', - 'csv_column_opposing-iban' => 'Opposing account (IBAN)', - 'csv_column_opposing-id' => 'Opposing account ID (matching Firefly)', - 'csv_column_opposing-name' => 'Opposing account (name)', + 'csv_column_opposing-iban' => 'Opondo-se conta (IBAN)', + 'csv_column_opposing-id' => 'ID da conta opostas (Firefly equivalente)', + 'csv_column_opposing-name' => 'Opondo-se conta (nome)', 'csv_column_rabo-debet-credit' => 'Rabobank specific debet/credit indicator', 'csv_column_ing-debet-credit' => 'ING specific debet/credit indicator', 'csv_column_sepa-ct-id' => 'SEPA Credit Transfer end-to-end ID', @@ -355,7 +396,7 @@ return [ 'csv_column_sepa-db' => 'SEPA Direct Debet', 'csv_column_tags-comma' => 'Tags (separadas por vírgula)', 'csv_column_tags-space' => 'Tags (separadas por espaço)', - 'csv_column_account-number' => 'Asset account (account number)', + 'csv_column_account-number' => 'Conta de ativo (número da conta)', 'csv_column_opposing-number' => 'Opposing account (account number)', 'csv_specifix_RabobankDescription' => 'Select this when you\'re importing Rabobank CSV export files.', 'csv_specifix_AbnAmroDescription' => 'Select this when you\'re importing ABN AMRO CSV export files.', @@ -363,6 +404,11 @@ return [ 'csv_import_account_help' => 'If your CSV file does NOT contain information about your asset account(s), use this dropdown to select to which account the transactions in the CSV belong to.', 'csv_delimiter_help' => 'Choose the field delimiter that is used in your input file. If not sure, comma is the safest option.', 'csv_date_parse_error' => 'Could not parse a valid date from ":value", using the format ":format". Are you sure your CSV is correct?', + 'could_not_recover' => 'Could not continue from the previous step. Your progress has been lost :(. The log files will tell you what happened.', + 'must_select_roles' => 'You must select some roles for your file content, or the process cannot continue.', + 'invalid_mapping' => 'You have submitted an invalid mapping. The process cannot continue.', + 'no_file_uploaded' => 'Parece que você não enviou um arquivo.', + // create new stuff: 'create_new_withdrawal' => 'Criar nova retirada', @@ -379,15 +425,15 @@ return [ 'edit_currency' => 'Editar moeda ":name"', 'store_currency' => 'Armazenar nova moeda', 'update_currency' => 'Atualizar moeda', - 'new_default_currency' => ':name is now the default currency.', - 'cannot_delete_currency' => 'Cannot delete :name because there are still transactions attached to it!', - 'deleted_currency' => 'Currency :name deleted', - 'created_currency' => 'Currency :name created', - 'updated_currency' => 'Currency :name updated', - 'ask_site_owner' => 'Please ask :owner to add, remove or edit currencies.', - 'currencies_intro' => 'Firefly III supports various currencies which you can set and enable here.', - 'make_default_currency' => 'make default', - 'default_currency' => 'default', + 'new_default_currency' => 'Agora :name é a moeda padrão.', + 'cannot_delete_currency' => 'Não é possível excluir :name porque ainda existem transações anexadas a ela!', + 'deleted_currency' => 'Moeda :name excluída', + 'created_currency' => 'Moeda :name criada', + 'updated_currency' => 'Moeda :name atualizada', + 'ask_site_owner' => 'Por favor, pergunte ao :owner para adicionar, remover ou editar moedas.', + 'currencies_intro' => 'Firefly III oferece suporte a várias moedas que você pode definir e ativar aqui.', + 'make_default_currency' => 'tornar padrão', + 'default_currency' => 'padrão', // new user: 'submit' => 'Enviar', @@ -395,6 +441,8 @@ return [ 'to_get_started' => 'To get started with Firefly, please enter your current bank\'s name, and the balance of your checking account:', 'savings_balance_text' => 'If you have a savings account, please enter the current balance of your savings account:', 'cc_balance_text' => 'If you have a credit card, please enter your credit card\'s limit.', + 'stored_new_account_new_user' => 'Yay! Your new account has been stored.', + 'stored_new_accounts_new_user' => 'Yay! Your new accounts have been stored.', // forms: 'mandatoryFields' => 'Campos obrigatórios', @@ -405,115 +453,155 @@ return [ // budgets: 'create_new_budget' => 'Criar um novo orçamento', 'store_new_budget' => 'Armazenar novo orçamento', + 'stored_new_budget' => 'Novo orçamento armazenado ":name"', 'availableIn' => 'Disponível em :date', 'transactionsWithoutBudget' => 'Despesas sem orçamentos', 'transactionsWithoutBudgetDate' => 'Despesas sem orçamentos em :date', 'createBudget' => 'Novo orçamento', 'inactiveBudgets' => 'Orçamentos inativos', - 'without_budget_between' => 'Transactions without a budget between :start and :end', + 'without_budget_between' => 'Transações sem um orçamento entre :start e :end', 'budget_in_month' => ':name no :month', - 'delete_budget' => 'Delete budget ":name"', - 'edit_budget' => 'Edit budget ":name"', - 'update_amount' => 'Update amount', - 'update_budget' => 'Update budget', + 'delete_budget' => 'Excluir orçamento ":name"', + 'deleted_budget' => 'Orçamento ":name" excluído', + 'edit_budget' => 'Editar orçamento ":name"', + 'updated_budget' => 'Orçamento atualizado ":name"', + 'update_amount' => 'Atualizar quantia', + 'update_budget' => 'Atualizar Orçamento', // bills: - 'delete_bill' => 'Delete bill ":name"', - 'edit_bill' => 'Edit bill ":name"', - 'update_bill' => 'Update bill', - 'store_new_bill' => 'Store new bill', + 'matching_on' => 'Matching on', + 'between_amounts' => 'between :low and :high.', + 'repeats' => 'Repeats', + 'connected_journals' => 'Connected transactions', + 'auto_match_on' => 'Automatically matched by Firefly', + 'auto_match_off' => 'Not automatically matched by Firefly', + 'next_expected_match' => 'Next expected match', + 'delete_bill' => 'Apagar fatura ":name"', + 'deleted_bill' => 'Fatura apagada ":name"', + 'edit_bill' => 'Editar fatura ":name"', + 'more' => 'More', + 'rescan_old' => 'Rescan old transactions', + 'update_bill' => 'Atualizar fatura', + 'updated_bill' => 'Fatura atualizada ":name"', + 'store_new_bill' => 'Armazenar nova fatura', + 'stored_new_bill' => 'Nova fatura armazenada ":name"', + 'cannot_scan_inactive_bill' => 'Faturas inativas não podem ser verificadas.', + 'rescanned_bill' => 'Tudo examinado novamente.', + 'bill_date_little_relevance' => 'A única parte desta data usado pelo Firefly é o dia. Só é útil quando a conta chega exatamente na mesma data, todo mês. Se a data de pagamento de suas contas varia, basta usar o primeiro dia do mês.', // accounts: - 'details_for_asset' => 'Details for asset account ":name"', - 'details_for_expense' => 'Details for expense account ":name"', - 'details_for_revenue' => 'Details for revenue account ":name"', - 'details_for_cash' => 'Details for cash account ":name"', - 'store_new_asset_account' => 'Store new asset account', - 'store_new_expense_account' => 'Store new expense account', - 'store_new_revenue_account' => 'Store new revenue account', - 'edit_asset_account' => 'Edit asset account ":name"', - 'edit_expense_account' => 'Edit expense account ":name"', - 'edit_revenue_account' => 'Edit revenue account ":name"', - 'delete_asset_account' => 'Delete asset account ":name"', - 'delete_expense_account' => 'Delete expense account ":name"', - 'delete_revenue_account' => 'Delete revenue account ":name"', - 'asset_deleted' => 'Successfully deleted asset account ":name"', - 'expense_deleted' => 'Successfully deleted expense account ":name"', - 'revenue_deleted' => 'Successfully deleted revenue account ":name"', - 'update_asset_account' => 'Update asset account', - 'update_expense_account' => 'Update expense account', - 'update_revenue_account' => 'Update revenue account', - 'make_new_asset_account' => 'Create a new asset account', - 'make_new_expense_account' => 'Create a new expense account', - 'make_new_revenue_account' => 'Create a new revenue account', - 'asset_accounts' => 'Asset accounts', - 'expense_accounts' => 'Expense accounts', - 'revenue_accounts' => 'Revenue accounts', + 'details_for_asset' => 'Detalhes para a conta de ativo ":name"', + 'details_for_expense' => 'Detalhes para a conta de despesas ":name"', + 'details_for_revenue' => 'Detalhes para a conta de receitas ":name"', + 'details_for_cash' => 'Detalhes para a conta de dinheiro ":name"', + 'store_new_asset_account' => 'Armazenar nova conta de ativo', + 'store_new_expense_account' => 'Armazenar nova conta de despesa', + 'store_new_revenue_account' => 'Armazenar nova conta de receita', + 'edit_asset_account' => 'Editar conta de ativo ":name"', + 'edit_expense_account' => 'Editar conta de despesa ":name"', + 'edit_revenue_account' => 'Editar conta de receitas ":name"', + 'delete_asset_account' => 'Excluir conta do activo ":name"', + 'delete_expense_account' => 'Excluir conta de despesas ":name"', + 'delete_revenue_account' => 'Excluir conta de receitas ":name"', + 'asset_deleted' => 'Conta de ativo ":name" excluído com sucesso', + 'expense_deleted' => 'Conta de despesa ":name" excluída com sucesso', + 'revenue_deleted' => 'Conta de receitas ":name" excluída com sucesso', + 'update_asset_account' => 'Atualizar de conta de ativo', + 'update_expense_account' => 'Atualizar conta de despesas', + 'update_revenue_account' => 'Atualizar conta de receita', + 'make_new_asset_account' => 'Criar uma nova conta de ativo', + 'make_new_expense_account' => 'Criar uma nova conta de despesa', + 'make_new_revenue_account' => 'Criar uma nova conta de receita', + 'asset_accounts' => 'Contas de ativo', + 'expense_accounts' => 'Contas de despesas', + 'revenue_accounts' => 'Contas de receitas', + 'cash_accounts' => 'Contas Correntes', + 'Cash account' => 'Conta Corrente', 'accountExtraHelp_asset' => '', 'accountExtraHelp_expense' => '', 'accountExtraHelp_revenue' => '', - 'account_type' => 'Account type', - 'save_transactions_by_moving' => 'Save these transaction(s) by moving them to another account:', + 'account_type' => 'Tipo de conta', + 'save_transactions_by_moving' => 'Salve essas transações, movendo-os para outra conta:', + 'stored_new_account' => 'Nova conta ":name" armazenado!', + 'updated_account' => 'Conta ":name" atualizada', + 'credit_card_options' => 'Credit card options', // categories: - 'new_category' => 'New category', - 'create_new_category' => 'Create a new category', - 'without_category' => 'Without a category', - 'update_category' => 'Wijzig categorie', - 'categories' => 'Categories', - 'edit_category' => 'Edit category ":name"', - 'no_category' => '(no category)', - 'category' => 'Category', - 'delete_category' => 'Delete category ":name"', - 'store_category' => 'Store new category', - 'without_category_between' => 'Without category between :start and :end', + 'new_category' => 'Nova categoria', + 'create_new_category' => 'Criar uma nova categoria', + 'without_category' => 'Sem uma categoria', + 'update_category' => 'Atualizar Categoria', + 'updated_category' => 'Atualizado categoria ":name"', + 'categories' => 'Categorias', + 'edit_category' => 'Editar categoria ":name"', + 'no_category' => '(sem categoria)', + 'category' => 'Categoria', + 'delete_category' => 'Excluir categoria ":name"', + 'deleted_category' => 'Categoria ":name" excluída', + 'store_category' => 'Armazenar nova categoria', + 'stored_category' => 'Armazenada nova categoria ":name"', + 'without_category_between' => 'Sem categoria entre :start e :end', // transactions: - 'update_withdrawal' => 'Update withdrawal', - 'update_deposit' => 'Update deposit', - 'update_transfer' => 'Update transfer', - 'delete_withdrawal' => 'Delete withdrawal ":description"', - 'delete_deposit' => 'Delete deposit ":description"', - 'delete_transfer' => 'Delete transfer ":description"', + 'update_withdrawal' => 'Atualizar retirada', + 'update_deposit' => 'Atualizar de depósito', + 'update_transfer' => 'Atualizar transferência', + 'updated_withdrawal' => 'Retirada Atualizada ":description"', + 'updated_deposit' => 'Depósito atualizado ":description"', + 'updated_transfer' => 'Transferência atualizada ":description"', + 'delete_withdrawal' => 'Excluir a retirada ":description"', + 'delete_deposit' => 'Apagar depósito ":description"', + 'delete_transfer' => 'Apagar transferência ":description"', + 'deleted_withdrawal' => 'Retirada ":description" excluída com sucesso', + 'deleted_deposit' => 'Depósito ":description" excluído com sucesso', + 'deleted_transfer' => 'Transferência ":description" excluída com sucesso', + 'stored_journal' => 'Transação ":description" excluída com sucesso', + 'select_transactions' => 'Select transactions', + 'stop_selection' => 'Stop selecting transactions', + 'edit_selected' => 'Edit selected', + 'delete_selected' => 'Delete selected', + 'mass_delete_journals' => 'Delete a number of transactions', + 'perm-delete-many' => 'Deleting many items in one go can be very disruptive. Please be cautious.', + // new user: - 'welcome' => 'Welcome to Firefly!', - 'createNewAsset' => 'Create a new asset account to get started. ' . - 'This will allow you to create transactions and start your financial management', + 'welcome' => 'Bem Vindo ao Firefly!', + 'createNewAsset' => 'Criar uma conta de ativo para começar. ' . + 'Isso permitirá que você crie transações e inicie a sua gestão financeira', 'createNewAssetButton' => 'Criar nova conta de ativo', // home page: - 'yourAccounts' => 'Your accounts', - 'budgetsAndSpending' => 'Budgets and spending', - 'savings' => 'Savings', - 'markAsSavingsToContinue' => 'Mark your asset accounts as "Savings account" to fill this panel', - 'createPiggyToContinue' => 'Create piggy banks to fill this panel.', - 'newWithdrawal' => 'New expense', + 'yourAccounts' => 'Suas contas', + 'budgetsAndSpending' => 'Orçamentos e despesas', + 'savings' => 'Poupanças', + 'markAsSavingsToContinue' => 'Marque suas contas de activo como "Poupança" para preencher este painel', + 'createPiggyToContinue' => 'Crie cofrinhos para preencher este painel.', + 'newWithdrawal' => 'Nova despesa', 'newDeposit' => 'Novo depósito', 'newTransfer' => 'Nova transferência', - 'moneyIn' => 'Money in', - 'moneyOut' => 'Money out', - 'billsToPay' => 'Bills to pay', - 'billsPaid' => 'Bills paid', - 'viewDetails' => 'View details', - 'divided' => 'divided', - 'toDivide' => 'left to divide', + 'moneyIn' => 'Dinheiro entra', + 'moneyOut' => 'Dinheiro sai', + 'billsToPay' => 'Faturas a pagar', + 'billsPaid' => 'Faturas pagas', + 'viewDetails' => 'Ver Detalhes', + 'divided' => 'dividida', + 'toDivide' => 'esquerda para dividir', // menu and titles, should be recycled as often as possible: - 'toggleNavigation' => 'Toggle navigation', - 'currency' => 'Currency', - 'preferences' => 'Preferences', - 'logout' => 'Logout', - 'searchPlaceholder' => 'Search...', - 'dashboard' => 'Dashboard', - 'currencies' => 'Currencies', - 'accounts' => 'Accounts', - 'Asset account' => 'Asset account', - 'Default account' => 'Asset account', + 'toggleNavigation' => 'Ativar/desativar navegação', + 'currency' => 'Moeda', + 'preferences' => 'Preferências', + 'logout' => 'Desconectar', + 'searchPlaceholder' => 'Pesquisar...', + 'dashboard' => 'Painel de Controle', + 'currencies' => 'Moedas', + 'accounts' => 'Contas', + 'Asset account' => 'Conta de ativo', + 'Default account' => 'Conta de ativo', 'Expense account' => 'Conta de Despesa', 'Revenue account' => 'Conta de Receita', - 'Initial balance account' => 'Initial balance account', - 'budgets' => 'Budgets', + 'Initial balance account' => 'Saldo inicial da conta', + 'budgets' => 'Orçamentos', 'tags' => 'Tags', 'reports' => 'Relatórios', 'transactions' => 'Transações', @@ -548,70 +636,81 @@ return [ 'profile' => 'Perfil', // reports: - 'report_default' => 'Default financial report for :start until :end', - 'report_audit' => 'Transaction history overview for :start until :end', - 'quick_link_reports' => 'Quick links', - 'quick_link_default_report' => 'Default financial report', - 'report_this_month_quick' => 'Current month, all accounts', - 'report_this_year_quick' => 'Current year, all accounts', - 'report_this_fiscal_year_quick' => 'Current fiscal year, all accounts', - 'report_all_time_quick' => 'All-time, all accounts', - 'reports_can_bookmark' => 'Remember that reports can be bookmarked.', + 'report_default' => 'Relatório financeiro padrão de :start até :end', + 'report_audit' => 'Visão geral do histórico de transação de :start até :end', + 'quick_link_reports' => 'Ligações rápidas', + 'quick_link_default_report' => 'Relatório financeiro padrão', + 'report_this_month_quick' => 'Mês atual, todas as contas', + 'report_this_year_quick' => 'Ano atual, todas as contas', + 'report_this_fiscal_year_quick' => 'Ano fiscal atual, todas as contas', + 'report_all_time_quick' => 'Todos os tempos, todas as contas', + 'reports_can_bookmark' => 'Lembre-se que relatórios podem ser marcados.', 'incomeVsExpenses' => 'Renda vs. Despesas', 'accountBalances' => 'Saldos de Contas', - 'balanceStartOfYear' => 'Balance at start of year', - 'balanceEndOfYear' => 'Balance at end of year', - 'balanceStartOfMonth' => 'Balance at start of month', - 'balanceEndOfMonth' => 'Balance at end of month', - 'balanceStart' => 'Balance at start of period', - 'balanceEnd' => 'Balance at end of period', - 'reportsOwnAccounts' => 'Reports for your own accounts', - 'reportsOwnAccountsAndShared' => 'Reports for your own accounts and shared accounts', - 'splitByAccount' => 'Split by account', - 'balancedByTransfersAndTags' => 'Balanced by transfers and tags', - 'coveredWithTags' => 'Covered with tags', + 'balanceStartOfYear' => 'Saldo no início do ano', + 'balanceEndOfYear' => 'Saldo no final do ano', + 'balanceStartOfMonth' => 'Saldo no início do mês', + 'balanceEndOfMonth' => 'Saldo no final do mês', + 'balanceStart' => 'Saldo no início do período', + 'balanceEnd' => 'Saldo no final do período', + 'reportsOwnAccounts' => 'Relatórios para suas próprias contas', + 'reportsOwnAccountsAndShared' => 'Relatórios para suas próprias contas e contas compartilhadas', + 'splitByAccount' => 'Dividir por conta', + 'balancedByTransfersAndTags' => 'Balanço por transferências e tags', + 'coveredWithTags' => 'Coberto com tags', 'leftUnbalanced' => 'Left unbalanced', 'expectedBalance' => 'Saldo Experado', 'outsideOfBudgets' => 'Fora do orçamento', 'leftInBudget' => 'Deixou no orçamento', 'sumOfSums' => 'Soma dos montantes', - 'noCategory' => '(no category)', + 'noCategory' => '(sem categoria)', 'notCharged' => 'Não cobrado (ainda)', 'inactive' => 'Inativo', + 'active' => 'Active', 'difference' => 'Diferente', 'in' => 'Entrada', 'out' => 'Saída', - 'topX' => 'top :number', + 'topX' => 'topo :number', 'showTheRest' => 'Mostrar tudo', 'hideTheRest' => 'Mostrar apenas os top :number', 'sum_of_year' => 'Soma do ano', - 'sum_of_years' => 'Sum of years', + 'sum_of_years' => 'Soma dos anos', 'average_of_year' => 'Média do ano', - 'average_of_years' => 'Average of years', - 'categories_earned_in_year' => 'Categories (by earnings)', - 'categories_spent_in_year' => 'Categories (by spendings)', - 'report_type' => 'Report type', - 'report_type_default' => 'Default financial report', - 'report_type_audit' => 'Transaction history overview (audit)', - 'report_included_accounts' => 'Included accounts', - 'report_date_range' => 'Date range', - 'report_include_help' => 'In all cases, transfers to shared accounts count as expenses, and transfers from shared accounts count as income.', - 'report_preset_ranges' => 'Pre-set ranges', - 'shared' => 'Shared', - 'fiscal_year' => 'Fiscal year', + 'average_of_years' => 'Média dos anos', + 'categories_earned_in_year' => 'Categorias (por lucro)', + 'categories_spent_in_year' => 'Categorias (por gastos)', + 'report_type' => 'Tipo de relatório', + 'report_type_default' => 'Relatório financeiro padrão', + 'report_type_audit' => 'Visão geral do histórico de transação (auditoria)', + 'report_type_meta-history' => 'Categories, budgets and bills overview', + 'more_info_help' => 'More information about these types of reports can be found in the help pages. Press the (?) icon in the top right corner.', + 'report_included_accounts' => 'Contas incluídas', + 'report_date_range' => 'Período', + 'report_include_help' => 'Em todos os casos, as transferências para contas compartilhadas contam como despesas e transferências de contas compartilhadas contam como renda.', + 'report_preset_ranges' => 'Intervalos pré-definidos', + 'shared' => 'Compartilhado', + 'fiscal_year' => 'Ano fiscal', + 'income_entry' => 'Rendimento da conta ":name" entre :start e :end', + 'expense_entry' => 'Despesas da conta ":name" entre :start e :end', + 'category_entry' => 'Despesas na categoria ":name" entre :start e :end', + 'budget_spent_amount' => 'Despesas no orçamento ":name" entre :start e :end', + 'balance_amount' => 'Despesas no orçamento ":budget" pagas por conta":account" entre :start e :end', + 'no_audit_activity' => 'Nenhuma atividade foi registrada na conta :account_name entre :start e :end.', + 'audit_end_balance' => 'Saldo da conta : account_name no final de :end foi :balance', // charts: + 'chart' => 'Chart', 'dayOfMonth' => 'Dia do mês', 'month' => 'Mês', 'budget' => 'Orçamento', 'spent' => 'Gasto', 'earned' => 'Ganho', 'overspent' => 'Gasto excedido', - 'left' => 'Left', - 'noBudget' => '(sem orçamento)', + 'left' => 'Esquerda', + 'no_budget' => '(sem orçamento)', 'maxAmount' => 'Valor Máximo', 'minAmount' => 'Valor Mínimo', - 'billEntry' => 'Current bill entry', + 'billEntry' => 'Entrada de fatura atual', 'name' => 'Nome', 'date' => 'Data', 'paid' => 'Pago', @@ -628,20 +727,22 @@ return [ // piggy banks: 'piggy_bank' => 'Cofrinho', 'new_piggy_bank' => 'Criar novo cofrinho', - 'store_piggy_bank' => 'Store new piggy bank', - 'account_status' => 'Account status', - 'left_for_piggy_banks' => 'Left for piggy banks', - 'sum_of_piggy_banks' => 'Sum of piggy banks', - 'saved_so_far' => 'Saved so far', - 'left_to_save' => 'Left to save', - 'add_money_to_piggy_title' => 'Add money to piggy bank ":name"', - 'remove_money_from_piggy_title' => 'Remove money from piggy bank ":name"', + 'store_piggy_bank' => 'Armazenar novo cofrinho', + 'stored_piggy_bank' => 'Armazenar novo cofrinho ":name"', + 'account_status' => 'Status da Conta', + 'left_for_piggy_banks' => 'Deixar para cofrinhos', + 'sum_of_piggy_banks' => 'Soma dos cofrinhos', + 'saved_so_far' => 'Salvo até agora', + 'left_to_save' => 'Esquerda para salvar', + 'add_money_to_piggy_title' => 'Adicionar dinheiro ao cofrinho ":name"', + 'remove_money_from_piggy_title' => 'Retire o dinheiro do cofrinho ":name"', 'add' => 'Adicionar', 'remove' => 'Remover', - 'max_amount_add' => 'The maximum amount you can add is', - 'max_amount_remove' => 'The maximum amount you can remove is', - 'update_piggy_button' => 'Update piggy bank', - 'update_piggy_title' => 'Update piggy bank ":name"', + 'max_amount_add' => 'É a quantidade máxima que você pode adicionar é', + 'max_amount_remove' => 'É a quantidade máxima que você pode remover é', + 'update_piggy_button' => 'Atualizar cofrinho', + 'update_piggy_title' => 'Atualizar cofrinho ":name"', + 'updated_piggy_bank' => 'Cofrinho ":name" atualizado', 'details' => 'Detalhes', 'events' => 'Eventos', 'target_amount' => 'Valor alvo', @@ -650,18 +751,26 @@ return [ 'no_target_date' => 'Nenhum data', 'todo' => 'A fazer', 'table' => 'Tabela', - 'piggy_bank_not_exists' => 'Piggy bank no longer exists.', - 'add_any_amount_to_piggy' => 'Add money to this piggy bank to reach your target of :amount.', - 'add_set_amount_to_piggy' => 'Add :amount to fill this piggy bank on :date', + 'piggy_bank_not_exists' => 'Cofrinho não existe mais.', + 'add_any_amount_to_piggy' => 'Adicionar dinheiro a este cofrinho para atingir sua meta de :amount.', + 'add_set_amount_to_piggy' => 'Adicionar :amount para encher este cofrinho em :date', 'delete_piggy_bank' => 'Apagar cofrinho ":name"', + 'cannot_add_amount_piggy' => 'Não foi possível adicionar :amount a ":name".', + 'deleted_piggy_bank' => 'Apagar cofrinho ":name"', + 'added_amount_to_piggy' => 'Adicionado :amount de ":name"', + 'removed_amount_from_piggy' => 'Removido :amount de ":name"', + 'cannot_remove_amount_piggy' => 'Não foi possível remover :amount de ":name".', // tags - 'regular_tag' => 'Just a regular tag.', - 'balancing_act' => 'The tag takes at most two transactions; an expense and a transfer. They\'ll balance each other out.', - 'advance_payment' => 'The tag accepts one expense and any number of deposits aimed to repay the original expense.', + 'regular_tag' => 'Apenas uma tag regular.', + 'balancing_act' => 'A tag leva no máximo duas transações; um gasto e uma transferência. Eles vão equilibrar um ao outro.', + 'advance_payment' => 'A tag aceita uma despesa e qualquer número de depósitos destinados para pagar a despesa original.', 'delete_tag' => 'Apagar tag ":tag"', + 'deleted_tag' => 'Apagar tag ":tag"', 'new_tag' => 'Fazer nova tag', 'edit_tag' => 'Editar tag ":tag"', + 'updated_tag' => 'Tag atualizada ":tag"', + 'created_tag' => 'Tag ":tag" foi criada!', 'no_year' => 'Nenhum ano definido', 'no_month' => 'Nenhum mês definido', 'tag_title_nothing' => 'Tags padrões', @@ -669,6 +778,12 @@ return [ 'tag_title_advancePayment' => 'Advance payment tags', 'tags_introduction' => 'Usually tags are singular words, designed to quickly band items together using things like expensive, bill or for-party. In Firefly III, tags can have more properties such as a date, description and location. This allows you to join transactions together in a more meaningful way. For example, you could make a tag called Christmas dinner with friends and add information about the restaurant. Such tags are "singular", you would only use them for a single occasion, perhaps with multiple transactions.', 'tags_group' => 'Tags group transactions together, which makes it possible to store reimbursements (in case you front money for others) and other "balancing acts" where expenses are summed up (the payments on your new TV) or where expenses and deposits are cancelling each other out (buying something with saved money). It\'s all up to you. Using tags the old-fashioned way is of course always possible.', - 'tags_start' => 'Create a tag to get started or enter tags when creating new transactions.', + 'tags_start' => 'Crie uma tag para começar ou insira tags ao criar novas transações.', + + // administration + 'administration' => 'Administração', + 'user_administration' => 'Administração de usuários', + 'list_all_users' => 'Todos os usuários', + 'all_users' => 'Todos os usuários', ]; diff --git a/resources/lang/pt_BR/form.php b/resources/lang/pt_BR/form.php index f5ad297722..c1ce96c93d 100644 --- a/resources/lang/pt_BR/form.php +++ b/resources/lang/pt_BR/form.php @@ -9,11 +9,12 @@ return [ + // new user: 'bank_name' => 'Nome do banco', 'bank_balance' => 'Saldo', 'savings_balance' => 'Salda da Poupança', 'credit_card_limit' => 'Limite do Cartão de Crédito', - 'automatch' => 'Match automatically', + 'automatch' => 'Equivale automaticamente', 'skip' => 'Pular', 'name' => 'Nome', 'active' => 'Ativar', @@ -23,15 +24,15 @@ return [ 'repeat_freq' => 'Repetições', 'account_from_id' => 'da conta', 'account_to_id' => 'para conta', - 'account_id' => 'Asset account', + 'account_id' => 'Conta de ativo', 'budget_id' => 'Orçamento', 'openingBalance' => 'Saldo inicial', - 'tagMode' => 'Tag mode', - 'tagPosition' => 'Tag location', + 'tagMode' => 'Modo de tag', + 'tagPosition' => 'Localização de tag', 'virtualBalance' => 'Saldo virtual', 'longitude_latitude' => 'Localização', 'targetamount' => 'Valor alvo', - 'accountRole' => 'Account role', + 'accountRole' => 'Tipo de conta', 'openingBalanceDate' => 'Data do Saldo inicial', 'ccType' => 'Plano de pagamento do Cartão de Crédito', 'ccMonthlyPaymentDate' => 'Data do pagamento mensal do Cartão de Crédito', @@ -44,9 +45,9 @@ return [ 'revenue_account' => 'Conta de Receita', 'amount' => 'Valor', 'date' => 'Data', - 'interest_date' => 'Interest date', - 'book_date' => 'Book date', - 'process_date' => 'Processing date', + 'interest_date' => 'Data de interesse', + 'book_date' => 'Data reserva', + 'process_date' => 'Data de processamento', 'category' => 'Categoria', 'tags' => 'Etiquetas', 'deletePermanently' => 'Apagar permanentemente', @@ -57,68 +58,70 @@ return [ 'symbol' => 'Símbolo', 'code' => 'Código', 'iban' => 'IBAN', - 'accountNumber' => 'Account number', + 'accountNumber' => 'Número de conta', 'csv' => 'Arquivo CSV', 'has_headers' => 'Cabeçalhos', 'date_format' => 'Formato da Data', 'csv_config' => 'Importar CSV de configuração', - 'specifix' => 'Bank- or file specific fixes', - 'csv_import_account' => 'Default import account', - 'csv_delimiter' => 'CSV field delimiter', + 'specifix' => 'Banco- ou arquivo específico corrigídos', + 'csv_import_account' => 'Conta de importação padrão', + 'csv_delimiter' => 'Delimitador de campo CSV', 'attachments[]' => 'Anexos', - 'store_new_withdrawal' => 'Store new withdrawal', - 'store_new_deposit' => 'Store new deposit', - 'store_new_transfer' => 'Store new transfer', - 'add_new_withdrawal' => 'Add a new withdrawal', - 'add_new_deposit' => 'Add a new deposit', - 'add_new_transfer' => 'Add a new transfer', - 'noPiggybank' => '(no piggy bank)', - 'noBudget' => '(sem orçamento)', + 'store_new_withdrawal' => 'Armazenar nova retirada', + 'store_new_deposit' => 'Armazenar novo depósito', + 'store_new_transfer' => 'Armazenar nova transferência', + 'add_new_withdrawal' => 'Adicionar uma nova retirada', + 'add_new_deposit' => 'Adicionar um novo depósito', + 'add_new_transfer' => 'Adicionar uma nova transferência', + 'noPiggybank' => '(nenhum cofrinho)', 'title' => 'Título', 'notes' => 'Notas', 'filename' => 'Nome do arquivo', - 'mime' => 'Mime type', + 'mime' => 'Tipo do Arquivo (MIME)', 'size' => 'Tamanho', - 'trigger' => 'Trigger', - 'stop_processing' => 'Stop processing', - 'start_date' => 'Start of range', - 'end_date' => 'End of range', - 'export_start_range' => 'Start of export range', - 'export_end_range' => 'End of export range', - 'export_format' => 'File format', - 'include_attachments' => 'Include uploaded attachments', - 'include_config' => 'Include configuration file', - 'include_old_uploads' => 'Include imported data', - 'accounts' => 'Export transactions from these accounts', - 'csv_comma' => 'A comma (,)', - 'csv_semicolon' => 'A semicolon (;)', - 'csv_tab' => 'A tab (invisible)', + 'trigger' => 'Disparo', + 'stop_processing' => 'Parar processamento', + 'start_date' => 'Início do intervalo', + 'end_date' => 'Final do intervalo', + 'export_start_range' => 'Início do intervalo de exportação', + 'export_end_range' => 'Fim do intervalo de exportação', + 'export_format' => 'Formato do arquivo', + 'include_attachments' => 'Incluir anexos enviados', + 'include_config' => 'Incluir o arquivo de configuração', + 'include_old_uploads' => 'Incluir dados importados', + 'accounts' => 'Exportar transações destas contas', + 'csv_comma' => 'Uma vírgula (,)', + 'csv_semicolon' => 'Um ponto e vírgula (;)', + 'csv_tab' => 'Um Tab (invisível)', 'delete_account' => 'Apagar conta ":name"', 'delete_bill' => 'Apagar fatura ":name"', - 'delete_budget' => 'Delete budget ":name"', - 'delete_category' => 'Delete category ":name"', - 'delete_currency' => 'Delete currency ":name"', - 'delete_journal' => 'Delete transaction with description ":description"', + 'delete_budget' => 'Excluir o orçamento ":name"', + 'delete_category' => 'Excluir categoria ":name"', + 'delete_currency' => 'Excluir moeda ":moeda"', + 'delete_journal' => 'Excluir a transação com a descrição ":description"', 'delete_attachment' => 'Apagar anexo ":name"', - 'delete_rule' => 'Delete rule ":title"', - 'delete_rule_group' => 'Delete rule group ":title"', - 'attachment_areYouSure' => 'Are you sure you want to delete the attachment named ":name"?', - 'account_areYouSure' => 'Are you sure you want to delete the account named ":name"?', + 'delete_rule' => 'Excluir regra ":title"', + 'delete_rule_group' => 'Exclua o grupo de regras ":title"', + 'attachment_areYouSure' => 'Tem certeza que deseja excluir o anexo denominado ":name"?', + 'account_areYouSure' => 'Tem certeza que deseja excluir a conta denominada ":name"?', 'bill_areYouSure' => 'Você tem certeza que quer apagar a fatura ":name"?', - 'rule_areYouSure' => 'Are you sure you want to delete the rule titled ":title"?', - 'ruleGroup_areYouSure' => 'Are you sure you want to delete the rule group titled ":title"?', - 'budget_areYouSure' => 'Are you sure you want to delete the budget named ":name"?', - 'category_areYouSure' => 'Are you sure you want to delete the category named ":name"?', - 'currency_areYouSure' => 'Are you sure you want to delete the currency named ":name"?', - 'piggyBank_areYouSure' => 'Are you sure you want to delete the piggy bank named ":name"?', - 'journal_areYouSure' => 'Are you sure you want to delete the transaction described ":description"?', + 'rule_areYouSure' => 'Tem certeza que deseja excluir a regra intitulada ":title"?', + 'ruleGroup_areYouSure' => 'Tem certeza que deseja excluir o grupo de regras intitulado ":title"?', + 'budget_areYouSure' => 'Tem certeza que deseja excluir o orçamento chamado ":name"?', + 'category_areYouSure' => 'Tem certeza que deseja excluir a categoria com o nome ":name"?', + 'currency_areYouSure' => 'Tem certeza que deseja excluir a moeda chamada ":name"?', + 'piggyBank_areYouSure' => 'Tem certeza que deseja excluir o cofrinho chamado ":name"?', + 'journal_areYouSure' => 'Tem certeza que deseja excluir a transação descrita ":description"?', + 'mass_journal_are_you_sure' => 'Are you sure you want to delete these transactions?', 'tag_areYouSure' => 'Você tem certeza que quer apagar a tag ":tag"?', - 'permDeleteWarning' => 'Deleting stuff from Firely is permanent and cannot be undone.', - 'also_delete_transactions' => 'The only transaction connected to this account will be deleted as well.|All :count transactions connected to this account will be deleted as well.', - 'also_delete_rules' => 'The only rule connected to this rule group will be deleted as well.|All :count rules connected to this rule group will be deleted as well.', - 'also_delete_piggyBanks' => 'The only piggy bank connected to this account will be deleted as well.|All :count piggy bank connected to this account will be deleted as well.', - 'bill_keep_transactions' => 'The only transaction connected to this bill will not be deleted.|All :count transactions connected to this bill will spared deletion.', - 'budget_keep_transactions' => 'The only transaction connected to this budget will not be deleted.|All :count transactions connected to this budget will spared deletion.', - 'category_keep_transactions' => 'The only transaction connected to this category will not be deleted.|All :count transactions connected to this category will spared deletion.', - 'tag_keep_transactions' => 'The only transaction connected to this tag will not be deleted.|All :count transactions connected to this tag will spared deletion.', + 'permDeleteWarning' => 'Exclusão de dados do Firely são permanentes e não podem ser desfeitos.', + 'mass_make_selection' => 'You can still prevent items from being deleted by removing the checkbox.', + 'delete_all_permanently' => 'Delete selected permanently', + 'also_delete_transactions' => 'A única transação ligada a essa conta será excluída também.|Todas as :count transações ligadas a esta conta serão excluídas também.', + 'also_delete_rules' => 'A única regra que ligado a este grupo de regras será excluída também.|Todos as :count regras ligadas a este grupo de regras serão excluídas também.', + 'also_delete_piggyBanks' => 'O único cofrinho conectado a essa conta será excluído também.|Todos os :count cofrinhos conectados a esta conta serão excluídos também.', + 'bill_keep_transactions' => 'A única transação a esta conta não será excluída.|Todos as :count transações conectadas a esta fatura não serão excluídos.', + 'budget_keep_transactions' => 'A única transação conectada a este orçamento não será excluída.|Todos :count transações ligadas a este orçamento não serão excluídos.', + 'category_keep_transactions' => 'A única transação ligada a esta categoria não será excluída.|Todos :count transações ligadas a esta categoria não serão excluídos.', + 'tag_keep_transactions' => 'A única transação ligada a essa marca não será excluída.|Todos :count transações ligadas a essa marca não serão excluídos.', ]; diff --git a/resources/lang/pt_BR/help.php b/resources/lang/pt_BR/help.php index 9e602bdccb..ed5f833cb9 100644 --- a/resources/lang/pt_BR/help.php +++ b/resources/lang/pt_BR/help.php @@ -9,24 +9,25 @@ return [ + // tour! 'main-content-title' => 'Bem Vindo ao Firefly III', 'main-content-text' => 'Do yourself a favor and follow this short guide to make sure you know your way around.', 'sidebar-toggle-title' => 'Sidebar to create stuff', 'sidebar-toggle-text' => 'Hidden under the plus icon are all the buttons to create new stuff. Accounts, transactions, everything!', 'account-menu-title' => 'All your accounts', 'account-menu-text' => 'Here you can find all the accounts you\'ve made.', - 'budget-menu-title' => 'Budgets', + 'budget-menu-title' => 'Orçamentos', 'budget-menu-text' => 'Use this page to organise your finances and limit spending.', 'report-menu-title' => 'Relatórios', - 'report-menu-text' => 'Check this out when you want a solid overview of your fiances.', + 'report-menu-text' => 'Check this out when you want a solid overview of your finances.', 'transaction-menu-title' => 'Transações', 'transaction-menu-text' => 'All transactions you\'ve created can be found here.', 'option-menu-title' => 'Opções', 'option-menu-text' => 'This is pretty self-explanatory.', 'main-content-end-title' => 'Fim!', 'main-content-end-text' => 'Remember that every page has a small question mark at the right top. Click it to get help about the page you\'re on.', - 'index' => 'index', - 'home' => 'home', + 'index' => 'índice', + 'home' => 'casa', 'accounts-index' => 'accounts.index', 'accounts-create' => 'accounts.create', 'accounts-edit' => 'accounts.edit', diff --git a/resources/lang/pt_BR/list.php b/resources/lang/pt_BR/list.php index 266ebfeb5c..38d4450553 100644 --- a/resources/lang/pt_BR/list.php +++ b/resources/lang/pt_BR/list.php @@ -8,34 +8,48 @@ */ return [ - 'name' => 'Nome', - 'role' => 'Papel', - 'currentBalance' => 'Saldo atual', - 'active' => 'Está ativo?', - 'lastActivity' => 'Última atividade', - 'balanceDiff' => 'Saldo diferente entre :start e :end', - 'matchedOn' => 'Coincide', - 'matchesOn' => 'Correspondido em', - 'matchingAmount' => 'Total', - 'lastMatch' => 'Último equivalente', - 'expectedMatch' => 'Equivalente esperado', - 'automatch' => 'Auto match?', - 'repeat_freq' => 'Repetições', - 'description' => 'Descrição', - 'amount' => 'Total', - 'date' => 'Data', - 'interest_date' => 'Interest date', - 'book_date' => 'Book date', - 'process_date' => 'Processing date', - 'from' => 'De', - 'to' => 'Até', - 'budget' => 'Orçamento', - 'category' => 'Categoria', - 'bill' => 'Fatura', - 'withdrawal' => 'Retirada', - 'deposit' => 'Depósito', - 'transfer' => 'Transferência', - 'type' => 'Tipo', - 'completed' => 'Completo', - 'iban' => 'IBAN', + 'buttons' => 'Botões', + 'icon' => 'Ícone', + 'create_date' => 'Criado em', + 'update_date' => 'Atualizado em', + 'balance_before' => 'Saldo Antes', + 'balance_after' => 'Saldo depois', + 'name' => 'Nome', + 'role' => 'Papel', + 'currentBalance' => 'Saldo atual', + 'active' => 'Está ativo?', + 'lastActivity' => 'Última atividade', + 'balanceDiff' => 'Saldo diferente entre :start e :end', + 'matchedOn' => 'Coincide', + 'matchesOn' => 'Correspondido em', + 'matchingAmount' => 'Total', + 'lastMatch' => 'Último equivalente', + 'expectedMatch' => 'Equivalente esperado', + 'automatch' => 'Auto match?', + 'repeat_freq' => 'Repetições', + 'description' => 'Descrição', + 'amount' => 'Total', + 'date' => 'Data', + 'interest_date' => 'Data de interesse', + 'book_date' => 'Data reserva', + 'process_date' => 'Data de processamento', + 'from' => 'De', + 'to' => 'Até', + 'budget' => 'Orçamento', + 'category' => 'Categoria', + 'bill' => 'Fatura', + 'withdrawal' => 'Retirada', + 'deposit' => 'Depósito', + 'transfer' => 'Transferência', + 'type' => 'Tipo', + 'completed' => 'Completo', + 'iban' => 'IBAN', + 'paid_current_period' => 'Pago este período', + 'email' => 'Email', + 'registered_at' => 'Registrado em', + 'is_activated' => 'Está ativo', + 'is_blocked' => 'Está bloqueado', + 'is_admin' => 'É admin', + 'has_two_factor' => 'Tem 2FA', + 'blocked_code' => 'Bloco de código', ]; diff --git a/resources/lang/pt_BR/passwords.php b/resources/lang/pt_BR/passwords.php index 6c382f830f..f630caad31 100644 --- a/resources/lang/pt_BR/passwords.php +++ b/resources/lang/pt_BR/passwords.php @@ -8,10 +8,10 @@ */ return [ - 'password' => 'Passwords must be at least six characters and match the confirmation.', - 'user' => 'We can\'t find a user with that e-mail address.', - 'token' => 'This password reset token is invalid.', - 'sent' => 'We have e-mailed your password reset link!', - 'reset' => 'Your password has been reset!', - 'blocked' => 'Nice try though.', + 'password' => 'A senha precisa ter no mínimo seis caracteres e tem que ser igual à confirmação de senha.', + 'user' => 'Não foi possível encontrar o usuário com este e-mail.', + 'token' => 'Este token de redefinição de senha é inválido.', + 'sent' => 'Nós te enviamos um email com um link para trocar a senha!', + 'reset' => 'Sua senha foi redefinida!', + 'blocked' => 'Boa tentativa.', ]; diff --git a/resources/lang/pt_BR/validation.php b/resources/lang/pt_BR/validation.php index b5ecfc0cba..ba12c8e297 100644 --- a/resources/lang/pt_BR/validation.php +++ b/resources/lang/pt_BR/validation.php @@ -8,8 +8,8 @@ */ return [ - 'iban' => 'This is not a valid IBAN.', - 'unique_account_number_for_user' => 'It looks like this account number is already in use.', + 'iban' => 'Este não é um válido IBAN.', + 'unique_account_number_for_user' => 'Parece que este número de conta já está em uso.', 'rule_trigger_value' => 'Este valor é inválido para o disparo selecionado.', 'rule_action_value' => 'Este valor é inválido para a ação selecionada.', 'invalid_domain' => 'Devido a restrições de segurança, você não pode registrar deste domínio.', @@ -75,5 +75,5 @@ return [ 'string' => 'O campo :attribute deve ser uma string.', 'url' => 'O formato do URL indicado para o campo :attribute é inválido.', 'timezone' => 'O campo :attribute deverá ter um fuso horário válido.', - '2fa_code' => 'The :attribute field is invalid.', + '2fa_code' => 'O campo :attribute é inválido.', ]; From fa85b2b5b2775afcd40b3368dab3831f0b223930 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 23 Apr 2016 18:53:16 +0200 Subject: [PATCH 22/34] Some layout fixes. [skip ci] --- resources/views/accounts/show.twig | 2 +- resources/views/bills/show.twig | 2 +- resources/views/budgets/show.twig | 4 +++- resources/views/categories/noCategory.twig | 2 +- resources/views/categories/show.twig | 2 +- resources/views/categories/show_with_date.twig | 2 +- 6 files changed, 8 insertions(+), 6 deletions(-) diff --git a/resources/views/accounts/show.twig b/resources/views/accounts/show.twig index ab2c17cf99..797aedcc6e 100644 --- a/resources/views/accounts/show.twig +++ b/resources/views/accounts/show.twig @@ -37,7 +37,7 @@

{{ 'transactions'|_ }}

-
+
{% include 'list.journals' with {sorting:true} %}
diff --git a/resources/views/bills/show.twig b/resources/views/bills/show.twig index 69f49b9cf7..4360562076 100644 --- a/resources/views/bills/show.twig +++ b/resources/views/bills/show.twig @@ -98,7 +98,7 @@

{{ 'connected_journals'|_ }}

-
+
{% include 'list.journals' %}
diff --git a/resources/views/budgets/show.twig b/resources/views/budgets/show.twig index 227961835b..da839b4fa2 100644 --- a/resources/views/budgets/show.twig +++ b/resources/views/budgets/show.twig @@ -35,7 +35,9 @@

{{ 'transactions'|_ }}

- {% include 'list.journals' %} +
+ {% include 'list.journals' %} +
diff --git a/resources/views/categories/noCategory.twig b/resources/views/categories/noCategory.twig index 7daef5aa6e..99b45446da 100644 --- a/resources/views/categories/noCategory.twig +++ b/resources/views/categories/noCategory.twig @@ -11,7 +11,7 @@
{{ subTitle }}
-
+
{% include 'list.journals' with {'journals': list} %}
diff --git a/resources/views/categories/show.twig b/resources/views/categories/show.twig index 2975c4b54b..2b77e6ef3c 100644 --- a/resources/views/categories/show.twig +++ b/resources/views/categories/show.twig @@ -34,7 +34,7 @@

{{ 'transactions'|_ }}

-
+
{% include 'list.journals' %}
diff --git a/resources/views/categories/show_with_date.twig b/resources/views/categories/show_with_date.twig index d8a6c1c17c..2e25627259 100644 --- a/resources/views/categories/show_with_date.twig +++ b/resources/views/categories/show_with_date.twig @@ -30,7 +30,7 @@

{{ 'transactions'|_ }}

-
+
{% include 'list.journals' %}
From 19e40e9976c4aa84621d51d2e10214f32ca201ff Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 23 Apr 2016 18:55:57 +0200 Subject: [PATCH 23/34] Expand transaction lists for mass delete / edit functionality. --- resources/views/accounts/show.twig | 2 +- resources/views/bills/show.twig | 1 + resources/views/budgets/noBudget.twig | 3 +++ resources/views/budgets/show.twig | 2 +- resources/views/categories/noCategory.twig | 3 +++ resources/views/categories/show.twig | 2 +- resources/views/categories/show_with_date.twig | 2 +- 7 files changed, 11 insertions(+), 4 deletions(-) diff --git a/resources/views/accounts/show.twig b/resources/views/accounts/show.twig index 797aedcc6e..3e2152e25a 100644 --- a/resources/views/accounts/show.twig +++ b/resources/views/accounts/show.twig @@ -57,5 +57,5 @@ - + {% endblock %} diff --git a/resources/views/bills/show.twig b/resources/views/bills/show.twig index 4360562076..703a83182c 100644 --- a/resources/views/bills/show.twig +++ b/resources/views/bills/show.twig @@ -114,4 +114,5 @@ + {% endblock %} diff --git a/resources/views/budgets/noBudget.twig b/resources/views/budgets/noBudget.twig index 4452f617a8..7f62ce3ac1 100644 --- a/resources/views/budgets/noBudget.twig +++ b/resources/views/budgets/noBudget.twig @@ -19,3 +19,6 @@
{% endblock %} +{% block scripts %} + +{% endblock %} \ No newline at end of file diff --git a/resources/views/budgets/show.twig b/resources/views/budgets/show.twig index da839b4fa2..1b04415a0d 100644 --- a/resources/views/budgets/show.twig +++ b/resources/views/budgets/show.twig @@ -108,5 +108,5 @@ - + {% endblock %} diff --git a/resources/views/categories/noCategory.twig b/resources/views/categories/noCategory.twig index 99b45446da..3f43588b4c 100644 --- a/resources/views/categories/noCategory.twig +++ b/resources/views/categories/noCategory.twig @@ -20,3 +20,6 @@ {% endblock %} +{% block scripts %} + +{% endblock %} diff --git a/resources/views/categories/show.twig b/resources/views/categories/show.twig index 2b77e6ef3c..f80113b6cc 100644 --- a/resources/views/categories/show.twig +++ b/resources/views/categories/show.twig @@ -78,5 +78,5 @@ - + {% endblock %} diff --git a/resources/views/categories/show_with_date.twig b/resources/views/categories/show_with_date.twig index 2e25627259..4e1cb77b81 100644 --- a/resources/views/categories/show_with_date.twig +++ b/resources/views/categories/show_with_date.twig @@ -46,5 +46,5 @@ - + {% endblock %} From 8883d185fe3bbb4e12a2b743a9858d4e35610070 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 23 Apr 2016 20:00:48 +0200 Subject: [PATCH 24/34] Fix tests. --- app/Http/Controllers/Chart/BillController.php | 2 +- tests/acceptance/Controllers/BillControllerTest.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Chart/BillController.php b/app/Http/Controllers/Chart/BillController.php index 88c617a621..f38af543d2 100644 --- a/app/Http/Controllers/Chart/BillController.php +++ b/app/Http/Controllers/Chart/BillController.php @@ -82,7 +82,7 @@ class BillController extends Controller } // get first transaction or today for start: - $results = $repository->getJournals($bill); + $results = $repository->getJournals($bill, 1, 200); // resort: $results = $results->sortBy( diff --git a/tests/acceptance/Controllers/BillControllerTest.php b/tests/acceptance/Controllers/BillControllerTest.php index f687b17cd4..42ac6bafa6 100644 --- a/tests/acceptance/Controllers/BillControllerTest.php +++ b/tests/acceptance/Controllers/BillControllerTest.php @@ -7,6 +7,7 @@ * of the MIT license. See the LICENSE file for details. */ use Carbon\Carbon; +use Illuminate\Pagination\LengthAwarePaginator; use Illuminate\Support\Collection; @@ -97,7 +98,7 @@ class BillControllerTest extends TestCase public function testShow($range) { $repository = $this->mock('FireflyIII\Repositories\Bill\BillRepositoryInterface'); - $repository->shouldReceive('getJournals')->once()->andReturn(new Collection); + $repository->shouldReceive('getJournals')->once()->andReturn(new LengthAwarePaginator([], 0, 50)); $repository->shouldReceive('nextExpectedMatch')->once()->andReturn(new Carbon); $this->be($this->user()); $this->changeDateRange($this->user(), $range); From b8e1944d20747e36d4cde9c8a7ad6e43e9d2779f Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 24 Apr 2016 07:18:39 +0200 Subject: [PATCH 25/34] Mass edit #241 --- .../Controllers/TransactionController.php | 87 +++++++++++++-- ...quest.php => MassDeleteJournalRequest.php} | 6 +- app/Http/Requests/MassEditJournalRequest.php | 53 +++++++++ app/Http/routes.php | 2 +- .../Journal/JournalRepository.php | 6 +- app/Support/ExpandedForm.php | 26 +++++ config/twigbridge.php | 2 +- resources/lang/en_US/firefly.php | 4 + resources/lang/en_US/form.php | 1 + resources/views/form/amount-small.twig | 24 +++++ resources/views/transactions/mass-delete.twig | 2 +- resources/views/transactions/mass-edit.twig | 101 ++++++++++++++++++ 12 files changed, 298 insertions(+), 16 deletions(-) rename app/Http/Requests/{MassJournalRequest.php => MassDeleteJournalRequest.php} (88%) create mode 100644 app/Http/Requests/MassEditJournalRequest.php create mode 100644 resources/views/form/amount-small.twig create mode 100644 resources/views/transactions/mass-edit.twig diff --git a/app/Http/Controllers/TransactionController.php b/app/Http/Controllers/TransactionController.php index 436bec9ecb..1a34d604c5 100644 --- a/app/Http/Controllers/TransactionController.php +++ b/app/Http/Controllers/TransactionController.php @@ -7,10 +7,10 @@ use Config; use ExpandedForm; use FireflyIII\Events\TransactionJournalStored; use FireflyIII\Events\TransactionJournalUpdated; -use FireflyIII\Exceptions\FireflyException; use FireflyIII\Helpers\Attachments\AttachmentHelperInterface; use FireflyIII\Http\Requests\JournalFormRequest; -use FireflyIII\Http\Requests\MassJournalRequest; +use FireflyIII\Http\Requests\MassDeleteJournalRequest; +use FireflyIII\Http\Requests\MassEditJournalRequest; use FireflyIII\Models\PiggyBank; use FireflyIII\Models\PiggyBankEvent; use FireflyIII\Models\Transaction; @@ -243,12 +243,12 @@ class TransactionController extends Controller } /** - * @param MassJournalRequest $request + * @param MassDeleteJournalRequest $request * @param JournalRepositoryInterface $repository * * @return mixed */ - public function massDestroy(MassJournalRequest $request, JournalRepositoryInterface $repository) + public function massDestroy(MassDeleteJournalRequest $request, JournalRepositoryInterface $repository) { $ids = $request->get('confirm_mass_delete'); $set = new Collection; @@ -263,14 +263,16 @@ class TransactionController extends Controller } } unset($journal); + $count = 0; + /** @var TransactionJournal $journal */ foreach ($set as $journal) { $repository->delete($journal); + $count++; } Preferences::mark(); - - Session::flash('success', trans('firefly.mass_deleted_transactions_success')); + Session::flash('success', trans('firefly.mass_deleted_transactions_success', ['amount' => $count])); // redirect to previous URL: return redirect(session('transactions.mass-delete.url')); @@ -282,15 +284,84 @@ class TransactionController extends Controller */ public function massEdit(Collection $journals) { - throw new FireflyException('Mass editing of journals is not yet supported.'); + $subTitle = trans('firefly.mass_edit_journals'); + /** @var ARI $accountRepository */ + $accountRepository = app('FireflyIII\Repositories\Account\AccountRepositoryInterface'); + $accountList = ExpandedForm::makeSelectList($accountRepository->getAccounts(['Default account', 'Asset account'])); + // put previous url in session + Session::put('transactions.mass-edit.url', URL::previous()); + Session::flash('gaEventCategory', 'transactions'); + Session::flash('gaEventAction', 'mass-edit'); + + return view('transactions.mass-edit', compact('journals', 'subTitle', 'accountList')); } /** * */ - public function massUpdate() + public function massUpdate(MassEditJournalRequest $request, JournalRepositoryInterface $repository) { + $journalIds = Input::get('journals'); + $count = 0; + if (is_array($journalIds)) { + foreach ($journalIds as $journalId) { + $journal = $repository->find(intval($journalId)); + if ($journal) { + // do update. + + // get optional fields: + $what = strtolower(TransactionJournal::transactionTypeStr($journal)); + $sourceAccountId = $request->get('source_account_id')[$journal->id] ?? 0; + $destAccountId = $request->get('destination_account_id')[$journal->id] ?? 0; + $expenseAccount = $request->get('expense_account')[$journal->id] ?? ''; + $revenueAccount = $request->get('revenue_account')[$journal->id] ?? ''; + $budgetId = $journal->budgets->first() ? $journal->budgets->first()->id : 0; + $category = $journal->categories->first() ? $journal->categories->first()->name : ''; + $tags = $journal->tags->pluck('tag')->toArray(); + + // for a deposit, the 'account_id' is the account the money is deposited on. + // needs a better way of handling. + // more uniform source/destination field names + $accountId = $sourceAccountId; + if ($what == 'deposit') { + $accountId = $destAccountId; + } + + // build data array + $data = [ + 'id' => $journal->id, + 'what' => $what, + 'description' => $request->get('description')[$journal->id], + 'account_id' => intval($accountId), + 'account_from_id' => intval($sourceAccountId), + 'account_to_id' => intval($destAccountId), + 'expense_account' => $expenseAccount, + 'revenue_account' => $revenueAccount, + 'amount' => round($request->get('amount')[$journal->id], 4), + 'user' => Auth::user()->id, + 'amount_currency_id_amount' => intval($request->get('amount_currency_id_amount_' . $journal->id)), + 'date' => new Carbon($request->get('date')[$journal->id]), + 'interest_date' => $journal->interest_date, + 'book_date' => $journal->book_date, + 'process_date' => $journal->process_date, + 'budget_id' => $budgetId, + 'category' => $category, + 'tags' => $tags, + + ]; + // call repository update function. + $repository->update($journal, $data); + + $count++; + } + } + } + Preferences::mark(); + Session::flash('success', trans('firefly.mass_edited_transactions_success', ['amount' => $count])); + + // redirect to previous URL: + return redirect(session('transactions.mass-edit.url')); } diff --git a/app/Http/Requests/MassJournalRequest.php b/app/Http/Requests/MassDeleteJournalRequest.php similarity index 88% rename from app/Http/Requests/MassJournalRequest.php rename to app/Http/Requests/MassDeleteJournalRequest.php index 63c9a4caf9..8426a96ab8 100644 --- a/app/Http/Requests/MassJournalRequest.php +++ b/app/Http/Requests/MassDeleteJournalRequest.php @@ -1,6 +1,6 @@ 'required|min:1,max:255', + 'source_account_id.*' => 'numeric|belongsToUser:accounts,id', + 'destination_account_id.*' => 'numeric|belongsToUser:accounts,id', + 'revenue_account' => 'max:255', + 'expense_account' => 'max:255', + ]; + } +} diff --git a/app/Http/routes.php b/app/Http/routes.php index 159f1647e7..c9caa03944 100644 --- a/app/Http/routes.php +++ b/app/Http/routes.php @@ -380,7 +380,7 @@ Route::group( // mass edit and mass delete. Route::get('/transactions/mass-edit/{journalList}', ['uses' => 'TransactionController@massEdit', 'as' => 'transactions.mass-edit']); Route::get('/transactions/mass-delete/{journalList}', ['uses' => 'TransactionController@massDelete', 'as' => 'transactions.mass-delete']); - Route::post('/transactions/mass-update/{journalList}', ['uses' => 'TransactionController@massUpdate', 'as' => 'transactions.mass-update']); + Route::post('/transactions/mass-update', ['uses' => 'TransactionController@massUpdate', 'as' => 'transactions.mass-update']); Route::post('/transactions/mass-destroy', ['uses' => 'TransactionController@massDestroy', 'as' => 'transactions.mass-destroy']); /** diff --git a/app/Repositories/Journal/JournalRepository.php b/app/Repositories/Journal/JournalRepository.php index 2775226b1f..71e7beb15d 100644 --- a/app/Repositories/Journal/JournalRepository.php +++ b/app/Repositories/Journal/JournalRepository.php @@ -407,15 +407,17 @@ class JournalRepository implements JournalRepositoryInterface $fromAccount = Account::find($data['account_from_id']); $toAccount = Account::find($data['account_to_id']); break; + default: + throw new FireflyException('Did not recognise transaction type.'); } if (is_null($toAccount)) { - Log::error('"to"-account is null, so we cannot continue!'); + Log::error('"to"-account is null, so we cannot continue!', ['data' => $data]); throw new FireflyException('"to"-account is null, so we cannot continue!'); } if (is_null($fromAccount)) { - Log::error('"from"-account is null, so we cannot continue!'); + Log::error('"from"-account is null, so we cannot continue!', ['data' => $data]); throw new FireflyException('"from"-account is null, so we cannot continue!'); } diff --git a/app/Support/ExpandedForm.php b/app/Support/ExpandedForm.php index c92580de77..4b266746c9 100644 --- a/app/Support/ExpandedForm.php +++ b/app/Support/ExpandedForm.php @@ -20,6 +20,31 @@ use Session; class ExpandedForm { + /** + * @param $name + * @param null $value + * @param array $options + * + * @return string + */ + public function amountSmall(string $name, $value = null, array $options = []): string + { + $label = $this->label($name, $options); + $options = $this->expandOptionArray($name, $label, $options); + $classes = $this->getHolderClasses($name); + $value = $this->fillFieldValue($name, $value); + $options['step'] = 'any'; + $options['min'] = '0.01'; + $defaultCurrency = isset($options['currency']) ? $options['currency'] : Amt::getDefaultCurrency(); + $currencies = Amt::getAllCurrencies(); + unset($options['currency']); + unset($options['placeholder']); + $html = view('form.amount-small', compact('defaultCurrency', 'currencies', 'classes', 'name', 'value', 'options'))->render(); + + return $html; + + } + /** * @param $name * @param null $value @@ -261,6 +286,7 @@ class ExpandedForm return $html; } + /** * @param $name diff --git a/config/twigbridge.php b/config/twigbridge.php index 4eea607b35..0aac166b97 100644 --- a/config/twigbridge.php +++ b/config/twigbridge.php @@ -144,7 +144,7 @@ return [ 'ExpandedForm' => [ 'is_safe' => [ 'date', 'text', 'select', 'balance', 'optionsList', 'checkbox', 'amount', 'tags', 'integer', 'textarea', 'location', - 'multiRadio', 'file', 'multiCheckbox', 'staticText' + 'multiRadio', 'file', 'multiCheckbox', 'staticText', 'amountSmall', ] ], 'Form' => [ diff --git a/resources/lang/en_US/firefly.php b/resources/lang/en_US/firefly.php index eb0e5408cd..168f57701b 100644 --- a/resources/lang/en_US/firefly.php +++ b/resources/lang/en_US/firefly.php @@ -561,7 +561,11 @@ return [ 'edit_selected' => 'Edit selected', 'delete_selected' => 'Delete selected', 'mass_delete_journals' => 'Delete a number of transactions', + 'mass_edit_journals' => 'Edit a number of transactions', + 'cannot_edit_other_fields' => 'You cannot mass-edit other fields than the ones here, because there is no room to show them. Please follow the link and edit them by one-by-one, if you need to edit these fields.', 'perm-delete-many' => 'Deleting many items in one go can be very disruptive. Please be cautious.', + 'mass_deleted_transactions_success' => 'Deleted :amount transaction(s).', + 'mass_edited_transactions_success' => 'Updated :amount transaction(s)', // new user: diff --git a/resources/lang/en_US/form.php b/resources/lang/en_US/form.php index e440a3d5b5..4b18bfdec4 100644 --- a/resources/lang/en_US/form.php +++ b/resources/lang/en_US/form.php @@ -117,6 +117,7 @@ return [ 'permDeleteWarning' => 'Deleting stuff from Firely is permanent and cannot be undone.', 'mass_make_selection' => 'You can still prevent items from being deleted by removing the checkbox.', 'delete_all_permanently' => 'Delete selected permanently', + 'update_all_journals' => 'Update these transactions', 'also_delete_transactions' => 'The only transaction connected to this account will be deleted as well.|All :count transactions connected to this account will be deleted as well.', 'also_delete_rules' => 'The only rule connected to this rule group will be deleted as well.|All :count rules connected to this rule group will be deleted as well.', 'also_delete_piggyBanks' => 'The only piggy bank connected to this account will be deleted as well.|All :count piggy bank connected to this account will be deleted as well.', diff --git a/resources/views/form/amount-small.twig b/resources/views/form/amount-small.twig new file mode 100644 index 0000000000..213c3f25ad --- /dev/null +++ b/resources/views/form/amount-small.twig @@ -0,0 +1,24 @@ +
+
+ + +
+ {{ Form.input('number', name, value, options) }} + + +
+ diff --git a/resources/views/transactions/mass-delete.twig b/resources/views/transactions/mass-delete.twig index c39b4eee43..8b9d26ee8b 100644 --- a/resources/views/transactions/mass-delete.twig +++ b/resources/views/transactions/mass-delete.twig @@ -1,7 +1,7 @@ {% extends "./layout/default.twig" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, journal) }} + {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName) }} {% endblock %} {% block content %} diff --git a/resources/views/transactions/mass-edit.twig b/resources/views/transactions/mass-edit.twig new file mode 100644 index 0000000000..b7b6bb994d --- /dev/null +++ b/resources/views/transactions/mass-edit.twig @@ -0,0 +1,101 @@ +{% extends "./layout/default.twig" %} + +{% block breadcrumbs %} + {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName) }} +{% endblock %} + +{% block content %} + {{ Form.open({'class' : 'form-horizontal','id' : 'destroy','url' : route('transactions.mass-update')}) }} + +
+
+
+
+

{{ 'mass_edit_journals'|_ }}

+
+
+

+ {{ 'cannot_edit_other_fields'|_ }} +

+ + + + + + + + + + {% for journal in journals %} + + + + + + + + + {% endfor %} +
 {{ trans('list.description') }}{{ trans('list.amount') }}{{ trans('list.date') }}{{ trans('list.from') }}{{ trans('list.to') }}
+ + + + + + + + + + + {% if journal.destination_amount > 0 %} + {% set amount = journal.destination_amount %} + {% else %} + {% set amount = journal.source_amount %} + {% endif %} + + {{ ExpandedForm.amountSmall('amount_'~journal.id, amount, {'name' : 'amount['~journal.id~']', 'currency' : journal.transactionCurrency}) }} + + + + + + + {% if journal.transaction_type_type == 'Transfer' or journal.transaction_type_type == 'Withdrawal' %} + {{ Form.select('source_account_id['~journal.id~']', accountList, journal.source_account_id, {'class': 'form-control'}) }} + {% else %} + + {{ Form.input('text', 'revenue_account['~journal.id~']', journal.source_account_name, {'class': 'form-control', 'placeholder': trans('form.revenue_account')}) }} + {% endif %} + + + + {% if journal.transaction_type_type == 'Transfer' or journal.transaction_type_type == 'Deposit' %} + + {{ Form.select('destination_account_id['~journal.id~']', accountList, journal.destination_account_id, {'class': 'form-control'}) }} + {% else %} + + {{ Form.input('text', 'expense_account['~journal.id~']', journal.destination_account_name, {'class': 'form-control', 'placeholder': trans('form.expense_account')}) }} + {% endif %} + +
+
+ +
+
+
+ + {{ Form.close|raw }} +{% endblock %} +{% block scripts %} + + +{% endblock %} \ No newline at end of file From bdbd22f98b9b42bfac6eb7053bd64b22252004e2 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 24 Apr 2016 09:02:21 +0200 Subject: [PATCH 26/34] Some language and code updates. --- resources/lang/en_US/breadcrumbs.php | 1 + resources/lang/fr_FR/breadcrumbs.php | 1 + resources/lang/fr_FR/firefly.php | 4 ++++ resources/lang/fr_FR/form.php | 1 + resources/lang/nl_NL/breadcrumbs.php | 1 + resources/lang/nl_NL/firefly.php | 4 ++++ resources/lang/nl_NL/form.php | 1 + resources/lang/pt_BR/breadcrumbs.php | 1 + resources/lang/pt_BR/firefly.php | 4 ++++ resources/lang/pt_BR/form.php | 1 + resources/views/budgets/noBudget.twig | 2 +- resources/views/list/journals.twig | 2 +- resources/views/transactions/index.twig | 2 +- resources/views/transactions/mass-edit.twig | 2 +- 14 files changed, 23 insertions(+), 4 deletions(-) diff --git a/resources/lang/en_US/breadcrumbs.php b/resources/lang/en_US/breadcrumbs.php index b5dae7a84d..bdd804cf63 100644 --- a/resources/lang/en_US/breadcrumbs.php +++ b/resources/lang/en_US/breadcrumbs.php @@ -1,4 +1,5 @@ 'Edit selected', 'delete_selected' => 'Delete selected', 'mass_delete_journals' => 'Delete a number of transactions', + 'mass_edit_journals' => 'Edit a number of transactions', + 'cannot_edit_other_fields' => 'You cannot mass-edit other fields than the ones here, because there is no room to show them. Please follow the link and edit them by one-by-one, if you need to edit these fields.', 'perm-delete-many' => 'Deleting many items in one go can be very disruptive. Please be cautious.', + 'mass_deleted_transactions_success' => 'Deleted :amount transaction(s).', + 'mass_edited_transactions_success' => 'Updated :amount transaction(s)', // new user: diff --git a/resources/lang/fr_FR/form.php b/resources/lang/fr_FR/form.php index d76859027d..eb5f3511c9 100644 --- a/resources/lang/fr_FR/form.php +++ b/resources/lang/fr_FR/form.php @@ -117,6 +117,7 @@ return [ 'permDeleteWarning' => 'Deleting stuff from Firely is permanent and cannot be undone.', 'mass_make_selection' => 'You can still prevent items from being deleted by removing the checkbox.', 'delete_all_permanently' => 'Delete selected permanently', + 'update_all_journals' => 'Update these transactions', 'also_delete_transactions' => 'The only transaction connected to this account will be deleted as well.|All :count transactions connected to this account will be deleted as well.', 'also_delete_rules' => 'The only rule connected to this rule group will be deleted as well.|All :count rules connected to this rule group will be deleted as well.', 'also_delete_piggyBanks' => 'The only piggy bank connected to this account will be deleted as well.|All :count piggy bank connected to this account will be deleted as well.', diff --git a/resources/lang/nl_NL/breadcrumbs.php b/resources/lang/nl_NL/breadcrumbs.php index 44452f3c98..54ef17e402 100644 --- a/resources/lang/nl_NL/breadcrumbs.php +++ b/resources/lang/nl_NL/breadcrumbs.php @@ -1,4 +1,5 @@ 'Wijzig geselecteerden', 'delete_selected' => 'Verwijder geselecteerden', 'mass_delete_journals' => 'Verwijder een aantal transacties', + 'mass_edit_journals' => 'Wijzig een aantal transacties', + 'cannot_edit_other_fields' => 'Je kan andere velden dan de velden die je hier ziet niet groepsgewijs wijzigen. Er is geen ruimte om ze te laten zien. Als je deze velden toch wilt wijzigen, volg dan de link naast de transactie en wijzig ze stuk voor stuk.', 'perm-delete-many' => 'Veel items in één keer verwijderen kan zeer storend zijn. Wees voorzichtig.', + 'mass_deleted_transactions_success' => 'Verwijder :amount transactie(s).', + 'mass_edited_transactions_success' => 'Wijzig :amount transactie(s)', // new user: diff --git a/resources/lang/nl_NL/form.php b/resources/lang/nl_NL/form.php index f334536bdc..4441007fc7 100644 --- a/resources/lang/nl_NL/form.php +++ b/resources/lang/nl_NL/form.php @@ -117,6 +117,7 @@ return [ 'permDeleteWarning' => 'Dingen verwijderen uit Firefly is permanent en kan niet ongedaan gemaakt worden.', 'mass_make_selection' => 'Je kan items alsnog redden van de ondergang door het vinkje weg te halen.', 'delete_all_permanently' => 'Verwijder geselecteerde items permanent', + 'update_all_journals' => 'Wijzig deze transacties', 'also_delete_transactions' => 'Ook de enige transactie verbonden aan deze rekening wordt verwijderd.|Ook alle :count transacties verbonden aan deze rekening worden verwijderd.', 'also_delete_rules' => 'De enige regel in deze regelgroep wordt ook verwijderd.|Alle :count regels in deze regelgroep worden ook verwijderd.', 'also_delete_piggyBanks' => 'Ook het spaarpotje verbonden aan deze rekening wordt verwijderd.|Ook alle :count spaarpotjes verbonden aan deze rekening worden verwijderd.', diff --git a/resources/lang/pt_BR/breadcrumbs.php b/resources/lang/pt_BR/breadcrumbs.php index 50905b0ff1..c09be3588c 100644 --- a/resources/lang/pt_BR/breadcrumbs.php +++ b/resources/lang/pt_BR/breadcrumbs.php @@ -1,4 +1,5 @@ 'Edit selected', 'delete_selected' => 'Delete selected', 'mass_delete_journals' => 'Delete a number of transactions', + 'mass_edit_journals' => 'Edit a number of transactions', + 'cannot_edit_other_fields' => 'You cannot mass-edit other fields than the ones here, because there is no room to show them. Please follow the link and edit them by one-by-one, if you need to edit these fields.', 'perm-delete-many' => 'Deleting many items in one go can be very disruptive. Please be cautious.', + 'mass_deleted_transactions_success' => 'Deleted :amount transaction(s).', + 'mass_edited_transactions_success' => 'Updated :amount transaction(s)', // new user: diff --git a/resources/lang/pt_BR/form.php b/resources/lang/pt_BR/form.php index c1ce96c93d..a372d46f85 100644 --- a/resources/lang/pt_BR/form.php +++ b/resources/lang/pt_BR/form.php @@ -117,6 +117,7 @@ return [ 'permDeleteWarning' => 'Exclusão de dados do Firely são permanentes e não podem ser desfeitos.', 'mass_make_selection' => 'You can still prevent items from being deleted by removing the checkbox.', 'delete_all_permanently' => 'Delete selected permanently', + 'update_all_journals' => 'Update these transactions', 'also_delete_transactions' => 'A única transação ligada a essa conta será excluída também.|Todas as :count transações ligadas a esta conta serão excluídas também.', 'also_delete_rules' => 'A única regra que ligado a este grupo de regras será excluída também.|Todos as :count regras ligadas a este grupo de regras serão excluídas também.', 'also_delete_piggyBanks' => 'O único cofrinho conectado a essa conta será excluído também.|Todos os :count cofrinhos conectados a esta conta serão excluídos também.', diff --git a/resources/views/budgets/noBudget.twig b/resources/views/budgets/noBudget.twig index 7f62ce3ac1..6abbb397d0 100644 --- a/resources/views/budgets/noBudget.twig +++ b/resources/views/budgets/noBudget.twig @@ -21,4 +21,4 @@ {% endblock %} {% block scripts %} -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/resources/views/list/journals.twig b/resources/views/list/journals.twig index a6b96110d1..ee1b145301 100644 --- a/resources/views/list/journals.twig +++ b/resources/views/list/journals.twig @@ -128,4 +128,4 @@ \ No newline at end of file + diff --git a/resources/views/transactions/index.twig b/resources/views/transactions/index.twig index 87c415374d..bf1f2efe79 100644 --- a/resources/views/transactions/index.twig +++ b/resources/views/transactions/index.twig @@ -20,4 +20,4 @@ {% endblock %} {% block scripts %} -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/resources/views/transactions/mass-edit.twig b/resources/views/transactions/mass-edit.twig index b7b6bb994d..bdc9831de1 100644 --- a/resources/views/transactions/mass-edit.twig +++ b/resources/views/transactions/mass-edit.twig @@ -98,4 +98,4 @@ {% block scripts %} -{% endblock %} \ No newline at end of file +{% endblock %} From ec12238ea1805e8da838a261c16c0cb2fae707e8 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 24 Apr 2016 09:14:40 +0200 Subject: [PATCH 27/34] Some code cleanup. --- app/Export/Processor.php | 2 + app/Repositories/Bill/BillRepository.php | 3 -- app/Repositories/Journal/JournalCollector.php | 1 + .../Journal/JournalRepositoryInterface.php | 6 --- app/Repositories/Tag/TagRepository.php | 39 ------------------- .../Tag/TagRepositoryInterface.php | 17 -------- 6 files changed, 3 insertions(+), 65 deletions(-) diff --git a/app/Export/Processor.php b/app/Export/Processor.php index a5e8b1549b..38bc8345df 100644 --- a/app/Export/Processor.php +++ b/app/Export/Processor.php @@ -15,6 +15,7 @@ use Config; use FireflyIII\Exceptions\FireflyException; use FireflyIII\Models\ExportJob; use FireflyIII\Models\TransactionJournal; +use FireflyIII\Repositories\Journal\JournalCollector; use Illuminate\Support\Collection; use Log; use Storage; @@ -89,6 +90,7 @@ class Processor public function collectJournals(): bool { $args = [$this->accounts, Auth::user(), $this->settings['startDate'], $this->settings['endDate']]; + /** @var JournalCollector $journalCollector */ $journalCollector = app('FireflyIII\Repositories\Journal\JournalCollector', $args); $this->journals = $journalCollector->collect(); Log::debug( diff --git a/app/Repositories/Bill/BillRepository.php b/app/Repositories/Bill/BillRepository.php index 44bafbd58b..90eb42c8b4 100644 --- a/app/Repositories/Bill/BillRepository.php +++ b/app/Repositories/Bill/BillRepository.php @@ -327,9 +327,6 @@ class BillRepository implements BillRepositoryInterface /** * Get all journals that were recorded on this bill between these dates. - * - * @deprecated - * * @param Bill $bill * @param Carbon $start * @param Carbon $end diff --git a/app/Repositories/Journal/JournalCollector.php b/app/Repositories/Journal/JournalCollector.php index 804b48c087..871563113b 100644 --- a/app/Repositories/Journal/JournalCollector.php +++ b/app/Repositories/Journal/JournalCollector.php @@ -47,6 +47,7 @@ class JournalCollector } /** + * @deprecated * @return Collection */ public function collect(): Collection diff --git a/app/Repositories/Journal/JournalRepositoryInterface.php b/app/Repositories/Journal/JournalRepositoryInterface.php index e70c40a0f7..ea4526806c 100644 --- a/app/Repositories/Journal/JournalRepositoryInterface.php +++ b/app/Repositories/Journal/JournalRepositoryInterface.php @@ -86,12 +86,6 @@ interface JournalRepositoryInterface */ public function getWithDate(int $journalId, Carbon $date): TransactionJournal; - /** - * @param TransactionJournal $journal - * @param array $array - * - * @return void - /** * * @param TransactionJournal $journal diff --git a/app/Repositories/Tag/TagRepository.php b/app/Repositories/Tag/TagRepository.php index 14fea48a91..a9cbea562f 100644 --- a/app/Repositories/Tag/TagRepository.php +++ b/app/Repositories/Tag/TagRepository.php @@ -110,45 +110,6 @@ class TagRepository implements TagRepositoryInterface return false; } - /** - * @deprecated - * This method scans the transaction journals from or to the given asset account - * and checks if these are part of a balancing act. If so, it will sum up the amounts - * transferred into the balancing act (if any) and return this amount. - * - * This method effectively tells you the amount of money that has been balanced out - * correctly in the given period for the given account. - * - * @param Account $account - * @param Carbon $start - * @param Carbon $end - * - * @return string - */ - public function coveredByBalancingActs(Account $account, Carbon $start, Carbon $end): string - { - // the quickest way to do this is by scanning all balancingAct tags - // because there will be less of them any way. - $tags = $this->user->tags()->where('tagMode', 'balancingAct')->get(); - $amount = '0'; - - /** @var Tag $tag */ - foreach ($tags as $tag) { - $journals = $tag->transactionjournals()->after($start)->before($end)->transactionTypes([TransactionType::TRANSFER])->get( - ['transaction_journals.*'] - ); - - /** @var TransactionJournal $journal */ - foreach ($journals as $journal) { - if (TransactionJournal::destinationAccount($journal)->id == $account->id) { - $amount = bcadd($amount, TransactionJournal::amount($journal)); - } - } - } - - return $amount; - } - /** * @param Tag $tag * diff --git a/app/Repositories/Tag/TagRepositoryInterface.php b/app/Repositories/Tag/TagRepositoryInterface.php index 0520c1caaf..d8c1d33c05 100644 --- a/app/Repositories/Tag/TagRepositoryInterface.php +++ b/app/Repositories/Tag/TagRepositoryInterface.php @@ -34,23 +34,6 @@ interface TagRepositoryInterface */ public function connect(TransactionJournal $journal, Tag $tag): bool; - /** - * @deprecated - * This method scans the transaction journals from or to the given asset account - * and checks if these are part of a balancing act. If so, it will sum up the amounts - * transferred into the balancing act (if any) and return this amount. - * - * This method effectively tells you the amount of money that has been balanced out - * correctly in the given period for the given account. - * - * @param Account $account - * @param Carbon $start - * @param Carbon $end - * - * @return string - */ - public function coveredByBalancingActs(Account $account, Carbon $start, Carbon $end): string; - /** * @param Tag $tag * From 99c219ed97725e77ba6942c4db063e3b1e3b5240 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 24 Apr 2016 12:24:59 +0200 Subject: [PATCH 28/34] Three fixes courtesy of user @Bonno --- app/Helpers/Csv/Converter/CategoryId.php | 2 +- app/Helpers/Csv/Converter/CategoryName.php | 2 +- app/Helpers/Csv/PostProcessing/Bill.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Helpers/Csv/Converter/CategoryId.php b/app/Helpers/Csv/Converter/CategoryId.php index b702f91a92..f92854e463 100644 --- a/app/Helpers/Csv/Converter/CategoryId.php +++ b/app/Helpers/Csv/Converter/CategoryId.php @@ -16,7 +16,7 @@ class CategoryId extends BasicConverter implements ConverterInterface /** * @return Category */ - public function convert(): Budget + public function convert(): Category { /** @var SingleCategoryRepositoryInterface $repository */ $repository = app('FireflyIII\Repositories\Category\SingleCategoryRepositoryInterface'); diff --git a/app/Helpers/Csv/Converter/CategoryName.php b/app/Helpers/Csv/Converter/CategoryName.php index 4ec0dc0ecd..dbfcf27e9a 100644 --- a/app/Helpers/Csv/Converter/CategoryName.php +++ b/app/Helpers/Csv/Converter/CategoryName.php @@ -17,7 +17,7 @@ class CategoryName extends BasicConverter implements ConverterInterface /** * @return Category */ - public function convert(): Budget + public function convert(): Category { /** @var SingleCategoryRepositoryInterface $repository */ $repository = app('FireflyIII\Repositories\Category\SingleCategoryRepositoryInterface'); diff --git a/app/Helpers/Csv/PostProcessing/Bill.php b/app/Helpers/Csv/PostProcessing/Bill.php index 9369fc26ad..0404c719a7 100644 --- a/app/Helpers/Csv/PostProcessing/Bill.php +++ b/app/Helpers/Csv/PostProcessing/Bill.php @@ -20,7 +20,7 @@ class Bill implements PostProcessorInterface { // get bill id. - if (!is_null($this->data['bill'])) { + if (!is_null($this->data['bill']) && !is_null($this->data['bill']->id)) { $this->data['bill-id'] = $this->data['bill']->id; } From 9c16fc13809a663309094a37f14089ee7c41015d Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 24 Apr 2016 18:25:52 +0200 Subject: [PATCH 29/34] Some small updates. --- app/Console/Commands/VerifyDatabase.php | 225 ++++ app/Console/Kernel.php | 23 +- app/Http/Controllers/HomeController.php | 2 +- composer.json | 21 +- composer.lock | 1568 ++++++++++++++++++++++- 5 files changed, 1796 insertions(+), 43 deletions(-) create mode 100644 app/Console/Commands/VerifyDatabase.php diff --git a/app/Console/Commands/VerifyDatabase.php b/app/Console/Commands/VerifyDatabase.php new file mode 100644 index 0000000000..6ba78ef4ac --- /dev/null +++ b/app/Console/Commands/VerifyDatabase.php @@ -0,0 +1,225 @@ +reportAccounts(); + // budgets with no limits + $this->reportBudgetLimits(); + // budgets with no transactions + $this->reportBudgets(); + // categories with no transactions + $this->reportCategories(); + // tags with no transactions + $this->reportTags(); + // sum of transactions is not zero. + $this->reportSum(); + // any deleted transaction journals that have transactions that are NOT deleted: + $this->reportJournals(); + // deleted transactions that are connected to a not deleted journal. + $this->reportTransactions(); + // deleted accounts that still have not deleted transactions or journals attached to them. + $this->reportDeletedAccounts(); + } + + /** + * Reports on accounts with no transactions. + */ + private function reportAccounts() + { + $set = Account + ::leftJoin('transactions', 'transactions.account_id', '=', 'accounts.id') + ->leftJoin('users', 'accounts.user_id', '=', 'users.id') + ->groupBy('accounts.id') + ->having('transaction_count', '=', 0) + ->get(['accounts.id', 'accounts.name', 'accounts.user_id', 'users.email', DB::raw('COUNT(`transactions`.`id`) AS `transaction_count`')]); + + /** @var stdClass $entry */ + foreach ($set as $entry) { + $line = 'User #' . $entry->user_id . ' (' . $entry->email . ') has account #' . $entry->id . ' ("' . Crypt::decrypt($entry->name) + . '") which has no transactions.'; + $this->line($line); + } + } + + /** + * Reports on budgets with no budget limits (which makes them pointless). + */ + private function reportBudgetLimits() + { + $set = Budget + ::leftJoin('budget_limits', 'budget_limits.budget_id', '=', 'budgets.id') + ->leftJoin('users', 'budgets.user_id', '=', 'users.id') + ->groupBy('budgets.id') + ->having('budget_limit_count', '=', 0) + ->get(['budgets.id', 'budgets.name', 'budgets.user_id', 'users.email', DB::raw('COUNT(`budget_limits`.`id`) AS `budget_limit_count`')]); + + /** @var stdClass $entry */ + foreach ($set as $entry) { + $line = 'User #' . $entry->user_id . ' (' . $entry->email . ') has budget #' . $entry->id . ' ("' . Crypt::decrypt($entry->name) + . '") which has no budget limits.'; + $this->line($line); + } + } + + /** + * Reports on budgets without any transactions. + */ + private function reportBudgets() + { + $set = Budget + ::leftJoin('budget_transaction_journal', 'budgets.id', '=', 'budget_transaction_journal.budget_id') + ->leftJoin('users', 'budgets.user_id', '=', 'users.id') + ->distinct() + ->get(['budgets.id', 'budgets.name', 'budget_transaction_journal.budget_id', 'budgets.user_id', 'users.email']); + + /** @var stdClass $entry */ + foreach ($set as $entry) { + $line = 'User #' . $entry->user_id . ' (' . $entry->email . ') has budget #' . $entry->id . ' ("' . Crypt::decrypt($entry->name) + . '") which has no transactions.'; + $this->line($line); + } + } + + /** + * Reports on categories without any transactions. + */ + private function reportCategories() + { + $set = Category + ::leftJoin('category_transaction_journal', 'categories.id', '=', 'category_transaction_journal.category_id') + ->leftJoin('users', 'categories.user_id', '=', 'users.id') + ->distinct() + ->get(['categories.id', 'categories.name', 'category_transaction_journal.category_id', 'categories.user_id', 'users.email']); + + /** @var stdClass $entry */ + foreach ($set as $entry) { + $line = 'User #' . $entry->user_id . ' (' . $entry->email . ') has category #' . $entry->id . ' ("' . Crypt::decrypt($entry->name) + . '") which has no transactions.'; + $this->line($line); + } + } + + private function reportDeletedAccounts() + { + } + + /** + * Any deleted transaction journals that have transactions that are NOT deleted: + */ + private function reportJournals() + { + $set = TransactionJournal + ::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') + ->whereNotNull('transaction_journals.deleted_at')// USE THIS + ->whereNull('transactions.deleted_at') + ->whereNotNull('transactions.id') + ->get( + [ + 'transaction_journals.id as journal_id', + 'transaction_journals.description', + 'transaction_journals.deleted_at as journal_deleted', + 'transactions.id as transaction_id', + 'transactions.deleted_at as transaction_deleted_at'] + ); + /** @var stdClass $entry */ + foreach ($set as $entry) { + $this->error( + 'Transaction #' . $entry->transaction_id . ' should have been deleted, but has not.' . + ' Find it in the table called `transactions` and change the `deleted_at` field to: "' . $entry->journal_deleted. '"' + ); + } + } + + /** + * Reports for each user when the sum of their transactions is not zero. + */ + private function reportSum() + { + /** @var UserRepositoryInterface $userRepository */ + $userRepository = app('FireflyIII\Repositories\User\UserRepositoryInterface'); + + /** @var User $user */ + foreach ($userRepository->all() as $user) { + /** @var AccountRepositoryInterface $repository */ + $repository = app('FireflyIII\Repositories\Account\AccountRepositoryInterface', [$user]); + $sum = $repository->sumOfEverything(); + if (bccomp($sum, '0') !== 0) { + $this->error('Transactions for user #' . $user->id . ' (' . $user->email . ') are off by ' . $sum . '!'); + } + } + } + + /** + * Reports on tags without any transactions. + */ + private function reportTags() + { + $set = Tag + ::leftJoin('tag_transaction_journal', 'tags.id', '=', 'tag_transaction_journal.tag_id') + ->leftJoin('users', 'tags.user_id', '=', 'users.id') + ->distinct() + ->get(['tags.id', 'tags.tag', 'tag_transaction_journal.tag_id', 'tags.user_id', 'users.email']); + + /** @var stdClass $entry */ + foreach ($set as $entry) { + $line = 'User #' . $entry->user_id . ' (' . $entry->email . ') has tag #' . $entry->id . ' ("' . $entry->tag + . '") which has no transactions.'; + $this->line($line); + } + } + + private function reportTransactions() + { + } +} diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 4540fcc9d8..bd2376f485 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -12,6 +12,7 @@ declare(strict_types = 1); namespace FireflyIII\Console; use FireflyIII\Console\Commands\UpgradeFireflyInstructions; +use FireflyIII\Console\Commands\VerifyDatabase; use Illuminate\Console\Scheduling\Schedule; use Illuminate\Foundation\Console\Kernel as ConsoleKernel; @@ -30,16 +31,17 @@ class Kernel extends ConsoleKernel * * @var array */ - protected $bootstrappers = [ - 'Illuminate\Foundation\Bootstrap\DetectEnvironment', - 'Illuminate\Foundation\Bootstrap\LoadConfiguration', - 'FireflyIII\Bootstrap\ConfigureLogging', - 'Illuminate\Foundation\Bootstrap\HandleExceptions', - 'Illuminate\Foundation\Bootstrap\RegisterFacades', - 'Illuminate\Foundation\Bootstrap\SetRequestForConsole', - 'Illuminate\Foundation\Bootstrap\RegisterProviders', - 'Illuminate\Foundation\Bootstrap\BootProviders', - ]; + protected $bootstrappers + = [ + 'Illuminate\Foundation\Bootstrap\DetectEnvironment', + 'Illuminate\Foundation\Bootstrap\LoadConfiguration', + 'FireflyIII\Bootstrap\ConfigureLogging', + 'Illuminate\Foundation\Bootstrap\HandleExceptions', + 'Illuminate\Foundation\Bootstrap\RegisterFacades', + 'Illuminate\Foundation\Bootstrap\SetRequestForConsole', + 'Illuminate\Foundation\Bootstrap\RegisterProviders', + 'Illuminate\Foundation\Bootstrap\BootProviders', + ]; /** * The Artisan commands provided by your application. @@ -49,6 +51,7 @@ class Kernel extends ConsoleKernel protected $commands = [ UpgradeFireflyInstructions::class, + VerifyDatabase::class, ]; /** diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index ee5a8a9147..89ec33df7b 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -121,7 +121,7 @@ class HomeController extends Controller $sum = $repository->sumOfEverything(); if (bccomp($sum, '0') !== 0) { - Session::flash('error', strval(trans('firefly.unbalanced_error', ['amount' => Amount::format($sum,false)]))); + Session::flash('error', strval(trans('firefly.unbalanced_error', ['amount' => Amount::format($sum, false)]))); } foreach ($accounts as $account) { diff --git a/composer.json b/composer.json index b1017007ed..387d512da0 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,19 @@ { "name": "grumpydictator/firefly-iii", "description": "Firefly III: a personal finances manager.", - "keywords": ["finance", "finances", "manager", "euro", "laravel", "money", "financials", "budgets", "transactions", "transfers", "management"], + "keywords": [ + "finance", + "finances", + "manager", + "euro", + "laravel", + "money", + "financials", + "budgets", + "transactions", + "transfers", + "management" + ], "license": "MIT", "homepage": "https://github.com/JC5/firefly-iii", "type": "project", @@ -11,8 +23,8 @@ "email": "thegrumpydictator@gmail.com", "homepage": "https://github.com/JC5", "role": "Developer" - }], - + } + ], "require": { "laravel/framework": "5.2.*", "davejamesmiller/laravel-breadcrumbs": "~3.0", @@ -68,7 +80,8 @@ "post-update-cmd": [ "php artisan cache:clear", "php artisan optimize", - "php artisan firefly:upgrade-instructions" + "php artisan firefly:upgrade-instructions", + "php artisan firefly:verify" ] }, "config": { diff --git a/composer.lock b/composer.lock index 09584c13fc..c0ae510416 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "eccf1460fa3a4cecc969593ffca9397e", + "hash": "3690c456942adf4550c4fb1bff265aae", "content-hash": "3551da50dc493828d3ae5d73c10984f0", "packages": [ { @@ -855,16 +855,16 @@ }, { "name": "laravel/framework", - "version": "v5.2.29", + "version": "v5.2.30", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "e3d644eb131f18c5f3d28ff7bc678bc797091f20" + "reference": "ecfbbfbf96105439cc9a40bc78277bdb0268e34d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/e3d644eb131f18c5f3d28ff7bc678bc797091f20", - "reference": "e3d644eb131f18c5f3d28ff7bc678bc797091f20", + "url": "https://api.github.com/repos/laravel/framework/zipball/ecfbbfbf96105439cc9a40bc78277bdb0268e34d", + "reference": "ecfbbfbf96105439cc9a40bc78277bdb0268e34d", "shasum": "" }, "require": { @@ -925,7 +925,7 @@ }, "require-dev": { "aws/aws-sdk-php": "~3.0", - "mockery/mockery": "~0.9.2", + "mockery/mockery": "~0.9.4", "pda/pheanstalk": "~3.0", "phpunit/phpunit": "~4.1", "predis/predis": "~1.0", @@ -943,7 +943,8 @@ "predis/predis": "Required to use the redis cache and queue drivers (~1.0).", "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (~2.0).", "symfony/css-selector": "Required to use some of the crawler integration testing tools (2.8.*|3.0.*).", - "symfony/dom-crawler": "Required to use most of the crawler integration testing tools (2.8.*|3.0.*)." + "symfony/dom-crawler": "Required to use most of the crawler integration testing tools (2.8.*|3.0.*).", + "symfony/psr-http-message-bridge": "Required to psr7 bridging features (0.2.*)." }, "type": "library", "extra": { @@ -979,7 +980,7 @@ "framework", "laravel" ], - "time": "2016-04-03 01:43:55" + "time": "2016-04-19 19:12:18" }, { "name": "laravelcollective/html", @@ -1162,16 +1163,16 @@ }, { "name": "league/flysystem", - "version": "1.0.20", + "version": "1.0.21", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "e87a786e3ae12a25cf78a71bb07b4b384bfaa83a" + "reference": "35a83cf67d80d7040f306c77b0a84b9fbcc4fbfb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/e87a786e3ae12a25cf78a71bb07b4b384bfaa83a", - "reference": "e87a786e3ae12a25cf78a71bb07b4b384bfaa83a", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/35a83cf67d80d7040f306c77b0a84b9fbcc4fbfb", + "reference": "35a83cf67d80d7040f306c77b0a84b9fbcc4fbfb", "shasum": "" }, "require": { @@ -1241,7 +1242,7 @@ "sftp", "storage" ], - "time": "2016-03-14 21:54:11" + "time": "2016-04-22 10:56:25" }, { "name": "monolog/monolog", @@ -1414,16 +1415,16 @@ }, { "name": "nikic/php-parser", - "version": "v2.0.1", + "version": "v2.1.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "ce5be709d59b32dd8a88c80259028759991a4206" + "reference": "47b254ea51f1d6d5dc04b9b299e88346bf2369e3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/ce5be709d59b32dd8a88c80259028759991a4206", - "reference": "ce5be709d59b32dd8a88c80259028759991a4206", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/47b254ea51f1d6d5dc04b9b299e88346bf2369e3", + "reference": "47b254ea51f1d6d5dc04b9b299e88346bf2369e3", "shasum": "" }, "require": { @@ -1439,7 +1440,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "2.1-dev" } }, "autoload": { @@ -1461,7 +1462,7 @@ "parser", "php" ], - "time": "2016-02-28 19:48:28" + "time": "2016-04-19 13:41:41" }, { "name": "paragonie/random_compat", @@ -2734,23 +2735,23 @@ }, { "name": "vlucas/phpdotenv", - "version": "v2.2.0", + "version": "v2.2.1", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "9caf304153dc2288e4970caec6f1f3b3bc205412" + "reference": "63f37b9395e8041cd4313129c08ece896d06ca8e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/9caf304153dc2288e4970caec6f1f3b3bc205412", - "reference": "9caf304153dc2288e4970caec6f1f3b3bc205412", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/63f37b9395e8041cd4313129c08ece896d06ca8e", + "reference": "63f37b9395e8041cd4313129c08ece896d06ca8e", "shasum": "" }, "require": { "php": ">=5.3.9" }, "require-dev": { - "phpunit/phpunit": "^4.8|^5.0" + "phpunit/phpunit": "^4.8 || ^5.0" }, "type": "library", "extra": { @@ -2765,7 +2766,7 @@ }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD" + "BSD-3-Clause-Attribution" ], "authors": [ { @@ -2775,13 +2776,12 @@ } ], "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", - "homepage": "http://github.com/vlucas/phpdotenv", "keywords": [ "dotenv", "env", "environment" ], - "time": "2015-12-29 15:10:30" + "time": "2016-04-15 10:48:49" }, { "name": "watson/validating", @@ -2839,7 +2839,1519 @@ "time": "2016-04-07 14:59:06" } ], - "packages-dev": null, + "packages-dev": [ + { + "name": "barryvdh/laravel-debugbar", + "version": "v2.2.0", + "source": { + "type": "git", + "url": "https://github.com/barryvdh/laravel-debugbar.git", + "reference": "13b7058d2120c8d5af7f1ada21b7c44dd87b666a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/13b7058d2120c8d5af7f1ada21b7c44dd87b666a", + "reference": "13b7058d2120c8d5af7f1ada21b7c44dd87b666a", + "shasum": "" + }, + "require": { + "illuminate/support": "5.1.*|5.2.*", + "maximebf/debugbar": "~1.11.0", + "php": ">=5.5.9", + "symfony/finder": "~2.7|~3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2-dev" + } + }, + "autoload": { + "psr-4": { + "Barryvdh\\Debugbar\\": "src/" + }, + "files": [ + "src/helpers.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com" + } + ], + "description": "PHP Debugbar integration for Laravel", + "keywords": [ + "debug", + "debugbar", + "laravel", + "profiler", + "webprofiler" + ], + "time": "2016-02-17 08:32:21" + }, + { + "name": "barryvdh/laravel-ide-helper", + "version": "v2.1.4", + "source": { + "type": "git", + "url": "https://github.com/barryvdh/laravel-ide-helper.git", + "reference": "f1ebd847aac9a4545325d35108cafc285fe1605f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/barryvdh/laravel-ide-helper/zipball/f1ebd847aac9a4545325d35108cafc285fe1605f", + "reference": "f1ebd847aac9a4545325d35108cafc285fe1605f", + "shasum": "" + }, + "require": { + "illuminate/console": "5.0.x|5.1.x|5.2.x", + "illuminate/filesystem": "5.0.x|5.1.x|5.2.x", + "illuminate/support": "5.0.x|5.1.x|5.2.x", + "php": ">=5.4.0", + "phpdocumentor/reflection-docblock": "^2.0.4", + "symfony/class-loader": "~2.3|~3.0" + }, + "require-dev": { + "doctrine/dbal": "~2.3" + }, + "suggest": { + "doctrine/dbal": "Load information from the database about models for phpdocs (~2.3)" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, + "autoload": { + "psr-4": { + "Barryvdh\\LaravelIdeHelper\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com" + } + ], + "description": "Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.", + "keywords": [ + "autocomplete", + "codeintel", + "helper", + "ide", + "laravel", + "netbeans", + "phpdoc", + "phpstorm", + "sublime" + ], + "time": "2016-03-03 08:45:00" + }, + { + "name": "doctrine/instantiator", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", + "shasum": "" + }, + "require": { + "php": ">=5.3,<8.0-DEV" + }, + "require-dev": { + "athletic/athletic": "~0.1.8", + "ext-pdo": "*", + "ext-phar": "*", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://github.com/doctrine/instantiator", + "keywords": [ + "constructor", + "instantiate" + ], + "time": "2015-06-14 21:17:01" + }, + { + "name": "fzaninotto/faker", + "version": "v1.5.0", + "source": { + "type": "git", + "url": "https://github.com/fzaninotto/Faker.git", + "reference": "d0190b156bcca848d401fb80f31f504f37141c8d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/d0190b156bcca848d401fb80f31f504f37141c8d", + "reference": "d0190b156bcca848d401fb80f31f504f37141c8d", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~1.5" + }, + "suggest": { + "ext-intl": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.5.x-dev" + } + }, + "autoload": { + "psr-4": { + "Faker\\": "src/Faker/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "François Zaninotto" + } + ], + "description": "Faker is a PHP library that generates fake data for you.", + "keywords": [ + "data", + "faker", + "fixtures" + ], + "time": "2015-05-29 06:29:14" + }, + { + "name": "hamcrest/hamcrest-php", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/hamcrest/hamcrest-php.git", + "reference": "8bfb4013724c1f62dc267af0e998207ac3fdc226" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/8bfb4013724c1f62dc267af0e998207ac3fdc226", + "reference": "8bfb4013724c1f62dc267af0e998207ac3fdc226", + "shasum": "" + }, + "require": { + "php": "^5.3|^7.0" + }, + "replace": { + "cordoval/hamcrest-php": "*", + "davedevelopment/hamcrest-php": "*", + "kodova/hamcrest-php": "*" + }, + "require-dev": { + "phpunit/php-file-iterator": "1.3.3", + "phpunit/phpunit": "~4.0", + "satooshi/php-coveralls": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "hamcrest" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "This is the PHP port of Hamcrest Matchers", + "keywords": [ + "test" + ], + "time": "2016-04-21 19:47:43" + }, + { + "name": "johnkary/phpunit-speedtrap", + "version": "v1.0.1", + "source": { + "type": "git", + "url": "https://github.com/johnkary/phpunit-speedtrap.git", + "reference": "76a26f8a903a9434608cdad2b41c40cd134ea326" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/johnkary/phpunit-speedtrap/zipball/76a26f8a903a9434608cdad2b41c40cd134ea326", + "reference": "76a26f8a903a9434608cdad2b41c40cd134ea326", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "3.7.*|~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-0": { + "JohnKary": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "John Kary", + "email": "john@johnkary.net" + } + ], + "description": "Find slow tests in your PHPUnit test suite", + "homepage": "https://github.com/johnkary/phpunit-speedtrap", + "keywords": [ + "phpunit", + "profile", + "slow" + ], + "time": "2015-09-13 19:01:00" + }, + { + "name": "maximebf/debugbar", + "version": "v1.11.1", + "source": { + "type": "git", + "url": "https://github.com/maximebf/php-debugbar.git", + "reference": "d9302891c1f0a0ac5a4f66725163a00537c6359f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/d9302891c1f0a0ac5a4f66725163a00537c6359f", + "reference": "d9302891c1f0a0ac5a4f66725163a00537c6359f", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "psr/log": "^1.0", + "symfony/var-dumper": "^2.6|^3.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0|^5.0" + }, + "suggest": { + "kriswallsmith/assetic": "The best way to manage assets", + "monolog/monolog": "Log using Monolog", + "predis/predis": "Redis storage" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.11-dev" + } + }, + "autoload": { + "psr-4": { + "DebugBar\\": "src/DebugBar/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Maxime Bouroumeau-Fuseau", + "email": "maxime.bouroumeau@gmail.com", + "homepage": "http://maximebf.com" + }, + { + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com" + } + ], + "description": "Debug bar in the browser for php application", + "homepage": "https://github.com/maximebf/php-debugbar", + "keywords": [ + "debug", + "debugbar" + ], + "time": "2016-01-22 12:22:23" + }, + { + "name": "mockery/mockery", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/padraic/mockery.git", + "reference": "4957f4086614e4fb4e710680f2c000dda0db1008" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/padraic/mockery/zipball/4957f4086614e4fb4e710680f2c000dda0db1008", + "reference": "4957f4086614e4fb4e710680f2c000dda0db1008", + "shasum": "" + }, + "require": { + "hamcrest/hamcrest-php": "^2.0@dev", + "lib-pcre": ">=7.0", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Mockery": "library/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Pádraic Brady", + "email": "padraic.brady@gmail.com", + "homepage": "http://blog.astrumfutura.com" + }, + { + "name": "Dave Marshall", + "email": "dave.marshall@atstsolutions.co.uk", + "homepage": "http://davedevelopment.co.uk" + } + ], + "description": "Mockery is a simple yet flexible PHP mock object framework for use in unit testing with PHPUnit, PHPSpec or any other testing framework. Its core goal is to offer a test double framework with a succinct API capable of clearly defining all possible object operations and interactions using a human readable Domain Specific Language (DSL). Designed as a drop in alternative to PHPUnit's phpunit-mock-objects library, Mockery is easy to integrate with PHPUnit and can operate alongside phpunit-mock-objects without the World ending.", + "homepage": "http://github.com/padraic/mockery", + "keywords": [ + "BDD", + "TDD", + "library", + "mock", + "mock objects", + "mockery", + "stub", + "test", + "test double", + "testing" + ], + "time": "2016-04-20 18:36:44" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8", + "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "suggest": { + "dflydev/markdown": "~1.0", + "erusev/parsedown": "~1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "phpDocumentor": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "mike.vanriel@naenius.com" + } + ], + "time": "2015-02-03 12:10:50" + }, + { + "name": "phpspec/prophecy", + "version": "v1.6.0", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "3c91bdf81797d725b14cb62906f9a4ce44235972" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/3c91bdf81797d725b14cb62906f9a4ce44235972", + "reference": "3c91bdf81797d725b14cb62906f9a4ce44235972", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": "^5.3|^7.0", + "phpdocumentor/reflection-docblock": "~2.0", + "sebastian/comparator": "~1.1", + "sebastian/recursion-context": "~1.0" + }, + "require-dev": { + "phpspec/phpspec": "~2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.5.x-dev" + } + }, + "autoload": { + "psr-0": { + "Prophecy\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "time": "2016-02-15 07:46:21" + }, + { + "name": "phpunit/php-code-coverage", + "version": "2.2.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "phpunit/php-file-iterator": "~1.3", + "phpunit/php-text-template": "~1.2", + "phpunit/php-token-stream": "~1.3", + "sebastian/environment": "^1.3.2", + "sebastian/version": "~1.0" + }, + "require-dev": { + "ext-xdebug": ">=2.1.4", + "phpunit/phpunit": "~4" + }, + "suggest": { + "ext-dom": "*", + "ext-xdebug": ">=2.2.1", + "ext-xmlwriter": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "time": "2015-10-06 15:47:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "1.4.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/6150bf2c35d3fc379e50c7602b75caceaa39dbf0", + "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "time": "2015-06-21 13:08:43" + }, + { + "name": "phpunit/php-text-template", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "time": "2015-06-21 13:50:34" + }, + { + "name": "phpunit/php-timer", + "version": "1.0.7", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3e82f4e9fc92665fafd9157568e4dcb01d014e5b", + "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "time": "2015-06-21 08:01:12" + }, + { + "name": "phpunit/php-token-stream", + "version": "1.4.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", + "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "time": "2015-09-15 10:49:45" + }, + { + "name": "phpunit/phpunit", + "version": "4.8.24", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "a1066c562c52900a142a0e2bbf0582994671385e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a1066c562c52900a142a0e2bbf0582994671385e", + "reference": "a1066c562c52900a142a0e2bbf0582994671385e", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-spl": "*", + "php": ">=5.3.3", + "phpspec/prophecy": "^1.3.1", + "phpunit/php-code-coverage": "~2.1", + "phpunit/php-file-iterator": "~1.4", + "phpunit/php-text-template": "~1.2", + "phpunit/php-timer": ">=1.0.6", + "phpunit/phpunit-mock-objects": "~2.3", + "sebastian/comparator": "~1.1", + "sebastian/diff": "~1.2", + "sebastian/environment": "~1.3", + "sebastian/exporter": "~1.2", + "sebastian/global-state": "~1.0", + "sebastian/version": "~1.0", + "symfony/yaml": "~2.1|~3.0" + }, + "suggest": { + "phpunit/php-invoker": "~1.1" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.8.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "time": "2016-03-14 06:16:08" + }, + { + "name": "phpunit/phpunit-mock-objects", + "version": "2.3.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", + "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": ">=5.3.3", + "phpunit/php-text-template": "~1.2", + "sebastian/exporter": "~1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "suggest": { + "ext-soap": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Mock Object library for PHPUnit", + "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "keywords": [ + "mock", + "xunit" + ], + "time": "2015-10-02 06:51:40" + }, + { + "name": "sebastian/comparator", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "937efb279bd37a375bcadf584dec0726f84dbf22" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22", + "reference": "937efb279bd37a375bcadf584dec0726f84dbf22", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/diff": "~1.2", + "sebastian/exporter": "~1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "http://www.github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "time": "2015-07-26 15:48:44" + }, + { + "name": "sebastian/diff", + "version": "1.4.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff" + ], + "time": "2015-12-08 07:14:41" + }, + { + "name": "sebastian/environment", + "version": "1.3.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "dc7a29032cf72b54f36dac15a1ca5b3a1b6029bf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/dc7a29032cf72b54f36dac15a1ca5b3a1b6029bf", + "reference": "dc7a29032cf72b54f36dac15a1ca5b3a1b6029bf", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "time": "2016-02-26 18:40:46" + }, + { + "name": "sebastian/exporter", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "7ae5513327cb536431847bcc0c10edba2701064e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/7ae5513327cb536431847bcc0c10edba2701064e", + "reference": "7ae5513327cb536431847bcc0c10edba2701064e", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/recursion-context": "~1.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "time": "2015-06-21 07:55:53" + }, + { + "name": "sebastian/global-state", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "time": "2015-10-12 03:26:01" + }, + { + "name": "sebastian/recursion-context", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "913401df809e99e4f47b27cdd781f4a258d58791" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/913401df809e99e4f47b27cdd781f4a258d58791", + "reference": "913401df809e99e4f47b27cdd781f4a258d58791", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "time": "2015-11-11 19:50:13" + }, + { + "name": "sebastian/version", + "version": "1.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "shasum": "" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "time": "2015-06-21 13:59:46" + }, + { + "name": "symfony/class-loader", + "version": "v3.0.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/class-loader.git", + "reference": "cbb7e6a9c0213a0cffa5d9065ee8214ca4e83877" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/class-loader/zipball/cbb7e6a9c0213a0cffa5d9065ee8214ca4e83877", + "reference": "cbb7e6a9c0213a0cffa5d9065ee8214ca4e83877", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "require-dev": { + "symfony/finder": "~2.8|~3.0", + "symfony/polyfill-apcu": "~1.1" + }, + "suggest": { + "symfony/polyfill-apcu": "For using ApcClassLoader on HHVM" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\ClassLoader\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony ClassLoader Component", + "homepage": "https://symfony.com", + "time": "2016-03-30 10:41:14" + }, + { + "name": "symfony/css-selector", + "version": "v3.0.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/css-selector.git", + "reference": "65e764f404685f2dc20c057e889b3ad04b2e2db0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/65e764f404685f2dc20c057e889b3ad04b2e2db0", + "reference": "65e764f404685f2dc20c057e889b3ad04b2e2db0", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\CssSelector\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jean-François Simon", + "email": "jeanfrancois.simon@sensiolabs.com" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony CssSelector Component", + "homepage": "https://symfony.com", + "time": "2016-03-04 07:55:57" + }, + { + "name": "symfony/dom-crawler", + "version": "v3.0.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/dom-crawler.git", + "reference": "18a06d7a9af41718c20764a674a0ebba3bc40d1f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/18a06d7a9af41718c20764a674a0ebba3bc40d1f", + "reference": "18a06d7a9af41718c20764a674a0ebba3bc40d1f", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/polyfill-mbstring": "~1.0" + }, + "require-dev": { + "symfony/css-selector": "~2.8|~3.0" + }, + "suggest": { + "symfony/css-selector": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\DomCrawler\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony DomCrawler Component", + "homepage": "https://symfony.com", + "time": "2016-03-23 13:23:25" + }, + { + "name": "symfony/yaml", + "version": "v3.0.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "0047c8366744a16de7516622c5b7355336afae96" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/0047c8366744a16de7516622c5b7355336afae96", + "reference": "0047c8366744a16de7516622c5b7355336afae96", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Yaml Component", + "homepage": "https://symfony.com", + "time": "2016-03-04 07:55:57" + } + ], "aliases": [], "minimum-stability": "stable", "stability-flags": { From 108794a6b63108aa518b171ca880e732f03dad27 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 24 Apr 2016 18:35:45 +0200 Subject: [PATCH 30/34] Improved verify command. --- app/Console/Commands/VerifyDatabase.php | 49 ++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/app/Console/Commands/VerifyDatabase.php b/app/Console/Commands/VerifyDatabase.php index 6ba78ef4ac..44b184c0d2 100644 --- a/app/Console/Commands/VerifyDatabase.php +++ b/app/Console/Commands/VerifyDatabase.php @@ -8,11 +8,13 @@ use FireflyIII\Models\Account; use FireflyIII\Models\Budget; use FireflyIII\Models\Category; use FireflyIII\Models\Tag; +use FireflyIII\Models\Transaction; use FireflyIII\Models\TransactionJournal; use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Repositories\User\UserRepositoryInterface; use FireflyIII\User; use Illuminate\Console\Command; +use Illuminate\Database\Eloquent\Builder; use stdClass; /** @@ -150,8 +152,35 @@ class VerifyDatabase extends Command } } + /** + * Reports on deleted accounts that still have not deleted transactions or journals attached to them. + */ private function reportDeletedAccounts() { + $set = Account + ::leftJoin('transactions', 'transactions.account_id', '=', 'accounts.id') + ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') + ->whereNotNull('accounts.deleted_at') + ->whereNotNull('transactions.id') + ->where( + function (Builder $q) { + $q->whereNull('transactions.deleted_at'); + $q->orWhereNull('transaction_journals.deleted_at'); + } + ) + ->get( + ['accounts.id as account_id', 'accounts.deleted_at as account_deleted_at', 'transactions.id as transaction_id', + 'transactions.deleted_at as transaction_deleted_at', 'transaction_journals.id as journal_id', + 'transaction_journals.deleted_at as journal_deleted_at'] + ); + /** @var stdClass $entry */ + foreach ($set as $entry) { + $date = is_null($entry->transaction_deleted_at) ? $entry->journal_deleted_at : $entry->transaction_deleted_at; + $this->error( + 'Account #' . $entry->account_id . ' should have been deleted, but has not.' . + ' Find it in the table called `accounts` and change the `deleted_at` field to: "' . $date . '"' + ); + } } /** @@ -176,7 +205,7 @@ class VerifyDatabase extends Command foreach ($set as $entry) { $this->error( 'Transaction #' . $entry->transaction_id . ' should have been deleted, but has not.' . - ' Find it in the table called `transactions` and change the `deleted_at` field to: "' . $entry->journal_deleted. '"' + ' Find it in the table called `transactions` and change the `deleted_at` field to: "' . $entry->journal_deleted . '"' ); } } @@ -219,7 +248,25 @@ class VerifyDatabase extends Command } } + /** + * Reports on deleted transactions that are connected to a not deleted journal. + */ private function reportTransactions() { + $set = Transaction + ::leftJoin('transaction_journals', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') + ->whereNotNull('transactions.deleted_at') + ->whereNull('transaction_journals.deleted_at') + ->get( + ['transactions.id as transaction_id', 'transactions.deleted_at as transaction_deleted', 'transaction_journals.id as journal_id', + 'transaction_journals.deleted_at'] + ); + /** @var stdClass $entry */ + foreach ($set as $entry) { + $this->error( + 'Transaction journal #' . $entry->journal_id . ' should have been deleted, but has not.' . + ' Find it in the table called `transaction_journals` and change the `deleted_at` field to: "' . $entry->transaction_deleted . '"' + ); + } } } From fb0638e8241672f49128aaed265b8448e08fd594 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 24 Apr 2016 18:36:44 +0200 Subject: [PATCH 31/34] Say what each thing is. --- app/Console/Commands/VerifyDatabase.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/Console/Commands/VerifyDatabase.php b/app/Console/Commands/VerifyDatabase.php index 44b184c0d2..3238c2c0dd 100644 --- a/app/Console/Commands/VerifyDatabase.php +++ b/app/Console/Commands/VerifyDatabase.php @@ -108,7 +108,7 @@ class VerifyDatabase extends Command /** @var stdClass $entry */ foreach ($set as $entry) { - $line = 'User #' . $entry->user_id . ' (' . $entry->email . ') has budget #' . $entry->id . ' ("' . Crypt::decrypt($entry->name) + $line = 'Notice: User #' . $entry->user_id . ' (' . $entry->email . ') has budget #' . $entry->id . ' ("' . Crypt::decrypt($entry->name) . '") which has no budget limits.'; $this->line($line); } @@ -127,7 +127,7 @@ class VerifyDatabase extends Command /** @var stdClass $entry */ foreach ($set as $entry) { - $line = 'User #' . $entry->user_id . ' (' . $entry->email . ') has budget #' . $entry->id . ' ("' . Crypt::decrypt($entry->name) + $line = 'Notice: User #' . $entry->user_id . ' (' . $entry->email . ') has budget #' . $entry->id . ' ("' . Crypt::decrypt($entry->name) . '") which has no transactions.'; $this->line($line); } @@ -146,7 +146,7 @@ class VerifyDatabase extends Command /** @var stdClass $entry */ foreach ($set as $entry) { - $line = 'User #' . $entry->user_id . ' (' . $entry->email . ') has category #' . $entry->id . ' ("' . Crypt::decrypt($entry->name) + $line = 'Notice: User #' . $entry->user_id . ' (' . $entry->email . ') has category #' . $entry->id . ' ("' . Crypt::decrypt($entry->name) . '") which has no transactions.'; $this->line($line); } @@ -177,7 +177,7 @@ class VerifyDatabase extends Command foreach ($set as $entry) { $date = is_null($entry->transaction_deleted_at) ? $entry->journal_deleted_at : $entry->transaction_deleted_at; $this->error( - 'Account #' . $entry->account_id . ' should have been deleted, but has not.' . + 'Error: Account #' . $entry->account_id . ' should have been deleted, but has not.' . ' Find it in the table called `accounts` and change the `deleted_at` field to: "' . $date . '"' ); } @@ -204,7 +204,7 @@ class VerifyDatabase extends Command /** @var stdClass $entry */ foreach ($set as $entry) { $this->error( - 'Transaction #' . $entry->transaction_id . ' should have been deleted, but has not.' . + 'Error: Transaction #' . $entry->transaction_id . ' should have been deleted, but has not.' . ' Find it in the table called `transactions` and change the `deleted_at` field to: "' . $entry->journal_deleted . '"' ); } @@ -224,7 +224,7 @@ class VerifyDatabase extends Command $repository = app('FireflyIII\Repositories\Account\AccountRepositoryInterface', [$user]); $sum = $repository->sumOfEverything(); if (bccomp($sum, '0') !== 0) { - $this->error('Transactions for user #' . $user->id . ' (' . $user->email . ') are off by ' . $sum . '!'); + $this->error('Error: Transactions for user #' . $user->id . ' (' . $user->email . ') are off by ' . $sum . '!'); } } } @@ -242,7 +242,7 @@ class VerifyDatabase extends Command /** @var stdClass $entry */ foreach ($set as $entry) { - $line = 'User #' . $entry->user_id . ' (' . $entry->email . ') has tag #' . $entry->id . ' ("' . $entry->tag + $line = 'Notice: User #' . $entry->user_id . ' (' . $entry->email . ') has tag #' . $entry->id . ' ("' . $entry->tag . '") which has no transactions.'; $this->line($line); } @@ -264,7 +264,7 @@ class VerifyDatabase extends Command /** @var stdClass $entry */ foreach ($set as $entry) { $this->error( - 'Transaction journal #' . $entry->journal_id . ' should have been deleted, but has not.' . + 'Error: Transaction journal #' . $entry->journal_id . ' should have been deleted, but has not.' . ' Find it in the table called `transaction_journals` and change the `deleted_at` field to: "' . $entry->transaction_deleted . '"' ); } From 4fe38bd31bdea6b5c124f10439630d98cf9792c4 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 24 Apr 2016 18:38:58 +0200 Subject: [PATCH 32/34] New release --- config/firefly.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/firefly.php b/config/firefly.php index 7197e1f7ee..3c7e8b8b19 100644 --- a/config/firefly.php +++ b/config/firefly.php @@ -2,7 +2,7 @@ return [ 'chart' => 'chartjs', - 'version' => '3.8.3', + 'version' => '3.8.4', 'index_periods' => ['1D', '1W', '1M', '3M', '6M', '1Y', 'custom'], 'budget_periods' => ['daily', 'weekly', 'monthly', 'quarterly', 'half-year', 'yearly'], 'csv_import_enabled' => true, From 54e829173ab4ab22a44668df7188602aa332ddaa Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 24 Apr 2016 18:44:29 +0200 Subject: [PATCH 33/34] Prep for next release. --- CHANGELOG.md | 17 +++++++++++++++++ resources/lang/en_US/firefly.php | 4 ++++ 2 files changed, 21 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a54b72e062..412b2d343d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,23 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] - No unreleased changes yet. + +## [3.8.4] - 2016-04-24 +### Added +- Lots of new translations. +- Can now set page size. +- Can now mass edit transactions. +- Can now mass delete transactions. +- Firefly will now attempt to verify the integrity of your database when updating. + +### Changed +- New version of Charts library. + +### Fixed +- Several CSV related bugs. +- Several other bugs. +- Bugs fixed by @Bonno. + ## [3.8.3] - 2016-04-17 ### Added - New audit report to see what happened. diff --git a/resources/lang/en_US/firefly.php b/resources/lang/en_US/firefly.php index 168f57701b..133b37a34d 100644 --- a/resources/lang/en_US/firefly.php +++ b/resources/lang/en_US/firefly.php @@ -275,6 +275,10 @@ return [ 'pref_two_factor_auth_remove_will_disable' => '(this will also disable two-factor authentication)', 'pref_save_settings' => 'Save settings', 'saved_preferences' => 'Preferences saved!', + 'transaction_page_size_title' => 'Page size', + 'transaction_page_size_help' => 'Any list of transactions shows at most this many transactions', + 'transaction_page_size_label' => 'Page size', + 'budget_maximum' => 'Budget maximum', // profile: 'change_your_password' => 'Change your password', From 93421b50f9cd58c2f07cf7d6e09f15ba492970ba Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 24 Apr 2016 18:47:03 +0200 Subject: [PATCH 34/34] New translations. --- resources/lang/fr_FR/firefly.php | 4 ++++ resources/lang/nl_NL/firefly.php | 4 ++++ resources/lang/pt_BR/firefly.php | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/resources/lang/fr_FR/firefly.php b/resources/lang/fr_FR/firefly.php index 19ce13fad2..c14f07ff81 100644 --- a/resources/lang/fr_FR/firefly.php +++ b/resources/lang/fr_FR/firefly.php @@ -275,6 +275,10 @@ return [ 'pref_two_factor_auth_remove_will_disable' => '(this will also disable two-factor authentication)', 'pref_save_settings' => 'Save settings', 'saved_preferences' => 'Preferences saved!', + 'transaction_page_size_title' => 'Page size', + 'transaction_page_size_help' => 'Any list of transactions shows at most this many transactions', + 'transaction_page_size_label' => 'Page size', + 'budget_maximum' => 'Budget maximum', // profile: 'change_your_password' => 'Change your password', diff --git a/resources/lang/nl_NL/firefly.php b/resources/lang/nl_NL/firefly.php index bf83beacae..332aec8d35 100644 --- a/resources/lang/nl_NL/firefly.php +++ b/resources/lang/nl_NL/firefly.php @@ -275,6 +275,10 @@ return [ 'pref_two_factor_auth_remove_will_disable' => '(hiermee zet je authenticatie in twee stappen ook uit)', 'pref_save_settings' => 'Instellingen opslaan', 'saved_preferences' => 'Voorkeuren opgeslagen!', + 'transaction_page_size_title' => 'Paginalengte', + 'transaction_page_size_help' => 'Elke lijst met transacties er op is zo lang', + 'transaction_page_size_label' => 'Paginalengte', + 'budget_maximum' => 'Maximale budgetgrootte', // profile: 'change_your_password' => 'Verander je wachtwoord', diff --git a/resources/lang/pt_BR/firefly.php b/resources/lang/pt_BR/firefly.php index 127de5f722..ba0b6bd44c 100644 --- a/resources/lang/pt_BR/firefly.php +++ b/resources/lang/pt_BR/firefly.php @@ -275,6 +275,10 @@ return [ 'pref_two_factor_auth_remove_will_disable' => '(isso também irá desativar a autenticação de duas etapas)', 'pref_save_settings' => 'Salvar definições', 'saved_preferences' => 'Preferências salvas!', + 'transaction_page_size_title' => 'Page size', + 'transaction_page_size_help' => 'Any list of transactions shows at most this many transactions', + 'transaction_page_size_label' => 'Page size', + 'budget_maximum' => 'Budget maximum', // profile: 'change_your_password' => 'Alterar sua senha',